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 mark.dickinson
Recipients mark.dickinson
Date 2010-02-03.13:58:33
SpamBayes Score 9.3501665e-05
Marked as misclassified No
Message-id <1265205516.08.0.748801363745.issue7845@psf.upfronthosting.co.za>
In-reply-to
Content
Currently in py3k, order comparisons for complex numbers raise a TypeError.  This was necessary in Python 2.x in order to make a complex <-> complex comparison raise an exception.  In 3.x, it's no longer necessary, since if both sides of a comparison return NotImplemented the result of the comparison is a TypeError (in 2.x the result is a value based on comparing the ids).

In py3k, complex.__lt__ could be changed to always return NotImplemented.  This would allow a custom class to implement its own comparisons with complex, and would remove an unnecessary special case.
History
Date User Action Args
2010-02-03 13:58:36mark.dickinsonsetrecipients: + mark.dickinson
2010-02-03 13:58:36mark.dickinsonsetmessageid: <1265205516.08.0.748801363745.issue7845@psf.upfronthosting.co.za>
2010-02-03 13:58:35mark.dickinsonlinkissue7845 messages
2010-02-03 13:58:34mark.dickinsoncreate