From: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:46:42 +0000 (+0500) Subject: gh-141218: Fix inaccurate object comparison documentation (#141221) X-Git-Tag: v3.15.0a3~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b372bd729528262d75f18953300987214e5fe11c;p=thirdparty%2FPython%2Fcpython.git gh-141218: Fix inaccurate object comparison documentation (#141221) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 327a7037aee0..f33b73238ec8 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