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 Tom Krauss
Recipients Tom Krauss
Date 2017-02-20.00:49:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487551792.12.0.674027934311.issue29602@psf.upfronthosting.co.za>
In-reply-to
Content
Consider the following simple class that provides a "__complex__" method.

class C(object):
  def __init__(self, x):
     self.x = x
  def __complex__(self):
    return self.x

x=C(-0j)

PYTHON 2.7.13
>>> x.x
-0j
>>> complex(x)
0j

PYTHON 3.6
>>> x.x
(-0-0j)
>>> complex(x)
(-0+0j)
History
Date User Action Args
2017-02-20 00:49:52Tom Krausssetrecipients: + Tom Krauss
2017-02-20 00:49:52Tom Krausssetmessageid: <1487551792.12.0.674027934311.issue29602@psf.upfronthosting.co.za>
2017-02-20 00:49:52Tom Krausslinkissue29602 messages
2017-02-20 00:49:51Tom Krausscreate