[Python-checkins] bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)

Miss Islington (bot) webhook-mailer at python.org
Fri Sep 13 09:14:46 EDT 2019


https://github.com/python/cpython/commit/4556b1d35c352c975f3cf066362cb6e24efe0668
commit: 4556b1d35c352c975f3cf066362cb6e24efe0668
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-09-13T06:14:42-07:00
summary:

bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)

(cherry picked from commit 375a3e2bdbeb4dce69aba4b5bc90f55fe27e81b4)

Co-authored-by: Julien Palard <julien at palard.fr>

files:
M Doc/c-api/typeobj.rst

diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index f8e30a0380b9..7c7a79129ccc 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -1311,12 +1311,6 @@ and :c:type:`PyType_Type` effectively act as defaults.)
    ``Py_NotImplemented``, if another error occurred it must return *NULL* and
    set an exception condition.
 
-   .. note::
-
-      If you want to implement a type for which only a limited set of
-      comparisons makes sense (e.g. ``==`` and ``!=``, but not ``<`` and
-      friends), directly raise :exc:`TypeError` in the rich comparison function.
-
    The following constants are defined to be used as the third argument for
    :c:member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:
 



More information about the Python-checkins mailing list