Re: repr(complex) in Py3.1

2009-10-24 Thread Stefan Behnel
Mark Dickinson, 24.10.2009 16:44: > On Oct 24, 3:26 pm, Stefan Behnel wrote: >> in Python 3.1.1, I get this: >> >> Python 3.1.1 (r311:74480, Oct 22 2009, 19:34:26) >> [GCC 4.3.2] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> -(2j) >> (-0-2j) >>

Re: repr(complex) in Py3.1

2009-10-24 Thread Martin v. Löwis
> I know at least that the float repr() was modified in Py3.1, but is the > above behaviour intentional? It certainly breaks doctests, and I don't see > a good reason for that. I don't know whether it was intentional, but it looks right to me. 2j is the complex number +0.0+2.0j (right?). Then, -(2

Re: repr(complex) in Py3.1

2009-10-24 Thread Mark Dickinson
On Oct 24, 3:26 pm, Stefan Behnel wrote: > Hi, > > in Python 3.1.1, I get this: > >   Python 3.1.1 (r311:74480, Oct 22 2009, 19:34:26) >   [GCC 4.3.2] on linux2 >   Type "help", "copyright", "credits" or "license" for more information. >   >>> 2j >   2j >   >>> -2j >   -2j >   >>> -0-2j >   -2j >

repr(complex) in Py3.1

2009-10-24 Thread Stefan Behnel
Hi, in Python 3.1.1, I get this: Python 3.1.1 (r311:74480, Oct 22 2009, 19:34:26) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 2j 2j >>> -2j -2j >>> -0-2j -2j >>> (-0-2j) -2j >>> -(2j) (-0-2j) The last line differs fro