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 brandtbucher
Recipients brandtbucher
Date 2019-02-26.08:04:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551168262.55.0.429171834399.issue36117@roundup.psfhosted.org>
In-reply-to
Content
Currently, it isn't legal to perform <, >, <=, or >= rich comparisons on any complex objects, even though these operations are mathematically well-defined for real numbers.

The attached PR addresses this by defining rich comparisons for real-valued complex objects against subclasses of int and float, as well as for decimal.Decimal and fractions.Fraction types. They still raise TypeErrors when either of the operands has a nonzero imaginary part.
History
Date User Action Args
2019-02-26 08:04:22brandtbuchersetrecipients: + brandtbucher
2019-02-26 08:04:22brandtbuchersetmessageid: <1551168262.55.0.429171834399.issue36117@roundup.psfhosted.org>
2019-02-26 08:04:22brandtbucherlinkissue36117 messages
2019-02-26 08:04:22brandtbuchercreate