[Python-checkins] Update numbers.rst (GH-31995)

miss-islington webhook-mailer at python.org
Wed May 11 03:36:57 EDT 2022


https://github.com/python/cpython/commit/a9b5bc3274537a1074a12ce32c36a3ff3b530763
commit: a9b5bc3274537a1074a12ce32c36a3ff3b530763
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-05-11T00:36:24-07:00
summary:

Update numbers.rst (GH-31995)

(cherry picked from commit dde8a1668e0a6ad09634d0c701742c91da616497)

Co-authored-by: Géry Ogam <gery.ogam at gmail.com>

files:
M Doc/library/numbers.rst

diff --git a/Doc/library/numbers.rst b/Doc/library/numbers.rst
index b77845ed0dee9..b12f82ed75a6f 100644
--- a/Doc/library/numbers.rst
+++ b/Doc/library/numbers.rst
@@ -202,9 +202,9 @@ forward and reverse instances of any given operator. For example,
             if isinstance(a, Rational):
                 # Includes ints.
                 return monomorphic_operator(a, b)
-            elif isinstance(a, numbers.Real):
+            elif isinstance(a, Real):
                 return fallback_operator(float(a), float(b))
-            elif isinstance(a, numbers.Complex):
+            elif isinstance(a, Complex):
                 return fallback_operator(complex(a), complex(b))
             else:
                 return NotImplemented



More information about the Python-checkins mailing list