complex() bug or feature?

Erik Max Francis max at alcyone.com
Thu Nov 8 13:12:30 EST 2001


Carsten Gaebler wrote:

> >>> complex('1', '1')
> (1+0j)
> >>>
> 
> If complex() allows stings as arguments (like float()), what's
> happened to the imaginary part?

It works as expected in Python 2.1.1, so I'd say it's just a bug.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Laws are silent in time of war.
\__/ Cicero
    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
 An Esperanto reference for English speakers.



More information about the Python-list mailing list