From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:52:38 +0000 (+0100) Subject: [3.13] gh-141218: Fix inaccurate object comparison documentation (GH-141221) (#142811) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2d34a13965574a06910b37f51c5793b75a9c639;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-141218: Fix inaccurate object comparison documentation (GH-141221) (#142811) Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com> 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 f07930b628a0..1b04f76c361a 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