Complex evaluation bug

wittempj@hotmail.com martin.witte at gmail.com
Thu May 18 13:09:47 EDT 2006


py> c = complex(1, 3)
py> print c
(1+3j)
py> d = complex('1+3j')
py> print d
(1+3j)
py> str(1+3j)
'(1+3j)'


complex takes two numbers, or a string representing a complex number.
the string you supply isn't a representation of valid complex number.




More information about the Python-list mailing list