https://github.com/python/cpython/commit/b372bd729528262d75f18953300987214e5fe11c commit: b372bd729528262d75f18953300987214e5fe11c branch: main author: Mohsin Mehmood <[email protected]> committer: hugovk <[email protected]> date: 2025-12-16T13:46:42+02:00 summary:
gh-141218: Fix inaccurate object comparison documentation (#141221) Co-authored-by: Bénédikt Tran <[email protected]> files: M Doc/library/stdtypes.rst diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 327a7037aee0d4..f33b73238ec8b3 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -164,7 +164,7 @@ This table summarizes the comparison operations: pair: object; numeric pair: objects; comparing -Objects of different types, except different numeric types, never compare equal. +Unless stated otherwise, objects of different types never compare equal. The ``==`` operator is always defined but for some object types (for example, class objects) is equivalent to :keyword:`is`. The ``<``, ``<=``, ``>`` and ``>=`` operators are only defined where they make sense; for example, they raise a _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
