Skip to content

Commit 81931c7

Browse files
committed
gh-141218: Fix inaccurate object comparison documentation
Changed "Objects of different types, except different numeric types, never compare equal" to "Objects of different types, unless documented otherwise, never compare equal" to account for documented exceptions like set/frozenset comparisons.
1 parent d13ee0a commit 81931c7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ This table summarizes the comparison operations:
164164
pair: object; numeric
165165
pair: objects; comparing
166166

167-
Objects of different types, except different numeric types, never compare equal.
167+
Objects of different types, unless documented otherwise, never compare equal.
168168
The ``==`` operator is always defined but for some object types (for example,
169169
class objects) is equivalent to :keyword:`is`. The ``<``, ``<=``, ``>`` and ``>=``
170170
operators are only defined where they make sense; for example, they raise a
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix inaccurate documentation about object comparison. Changed "Objects of different
2+
types, except different numeric types, never compare equal" to "Objects of different
3+
types, unless documented otherwise, never compare equal" to account for documented
4+
exceptions like set/frozenset comparisons.

0 commit comments

Comments
 (0)