Stephen McInerney wrote:
Why does the complex.__str__() method on complex numbers add the
enclosing parentheses?
Because it was designed that way and then implemented to follow the
design.
Or are you asking why it was designed that way? I guess you'd have to
ask the designer.
At least
On Fri, Sep 19, 2008 at 4:26 AM, Stephen McInerney
<[EMAIL PROTECTED]>wrote:
>
> Why does the complex.__str__() method on complex numbers add the enclosing
> parentheses?
> It's unwanted, and it also makes them look like a tuple (other than the
> trailing comma).
> How can I get rid of it, other t
Why does the complex.__str__() method on complex numbers add the enclosing
parentheses?
It's unwanted, and it also makes them look like a tuple (other than the
trailing comma).
How can I get rid of it, other than the clunky:
>>> print d(0.80-0.58j)>>> print repr(d)[1:-1]0.80-0.58j
How can