Skip to content

Commit 4556b1d

Browse files
bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)
(cherry picked from commit 375a3e2) Co-authored-by: Julien Palard <[email protected]>
1 parent 60d5e2c commit 4556b1d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Doc/c-api/typeobj.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,12 +1311,6 @@ and :c:type:`PyType_Type` effectively act as defaults.)
13111311
``Py_NotImplemented``, if another error occurred it must return *NULL* and
13121312
set an exception condition.
13131313

1314-
.. note::
1315-
1316-
If you want to implement a type for which only a limited set of
1317-
comparisons makes sense (e.g. ``==`` and ``!=``, but not ``<`` and
1318-
friends), directly raise :exc:`TypeError` in the rich comparison function.
1319-
13201314
The following constants are defined to be used as the third argument for
13211315
:c:member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:
13221316

0 commit comments

Comments
 (0)