This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hwundram
Date 2006-05-19.21:27:31
SpamBayes Score
Marked as misclassified
As per request on c.l.p:

I've implemented a small patch to change the output of
repr(x) for complex variables, so that complex(repr(x))
works for any complex x. This changes the output of
repr(x) to


without brackets, but leaves the string output
untouched. This change of behaviour would be in line
with int(repr(x)) and float(repr(x)) being defined for
any int or float x, repectively.

I don't know whether this patch is sensible, and
whether it breaks any current code, because (for example)

eval("5*%r" % (1+2j,))

won't work properly anymore, or whether it'd be more
sensible to change the complex constructor to also
accept a bracketed expression. I'll attach a patch to
do the latter later.
Date User Action Args
2007-08-23 15:48:58adminlinkissue1491866 messages
2007-08-23 15:48:58admincreate