On Tue, 1 Feb 2005 12:16:10 -0500, A.M. Kuchling <amk at amk.ca> wrote: >. Well, complex('2+2j') works, so it's not that far... But the rules are different: - There's no requirement whatsoever for str(); it can be whatever makes the most sense for the type. - For repr(), if at all possible, eval(repr(x)) == x should hold, in a suitable environment (you may have to import certain things in the namespace). If this can't be made true, repr(x) should be of the form <...>. - If there's no need for str() and repr() to be different, let str(x) == repr(x). So I think complex() is just fine. -- --Guido van Rossum (home page:)