(in)exactness of complex numbers

Tim Peters tim.one at home.com
Wed Aug 1 20:06:06 EDT 2001


[Bengt Richter]
> ...
> I don't think there is there's any reason you *couldn't*
> use general numbers (excluding complex ;-) as the real and imag parts.

The old Demo/classes/Complex.py allows even complex numbers as "the real"
and "the imaginary" components of a Complex() object -- the constructor is
obviously trying to allow for that, but the code looks like it would blow up
if you tried it.  If true, nobody ever tried it, or did but didn't care
enough to bother fixing it -- or even reporting it.

> I'm guessing it would just be a lot of mostly boring rework programming
> and there's hotter things now for the internals people (of which I'm
> not one, in case the thought occurred. Not that I wouldn't like to be at
> some point ;-).

Jump in!  Love to have you.  Try to do something useful, though <wink>.

> The trick would be to preserve speed and still get generality. I think
> it could be done, but is that where you want to allocate the people
> who both can and are in a position to do that?

Guido doesn't allocate much of anything -- for an Absolute Dictator, he's
got surprisingly little power.  The things that get worked on are what
people generously volunteer to do.  In the other direction, though, my bet
is you'd face strong resistance if you proposed to bloat the code base with
generalizations of complex numbers that have no value to Python users beyond
"oooh! neat hack -- I guess".  There are nagging small continuing costs of
many kinds that come with each line of code.

including-the-burden-of-reading-them<wink>-ly y'rs  - tim





More information about the Python-list mailing list