]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update numbers.rst (GH-31995)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 11 May 2022 07:36:24 +0000 (00:36 -0700)
committerGitHub <noreply@github.com>
Wed, 11 May 2022 07:36:24 +0000 (00:36 -0700)
(cherry picked from commit dde8a1668e0a6ad09634d0c701742c91da616497)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Doc/library/numbers.rst

index b77845ed0dee92646146f831b19bfd71f21a1099..b12f82ed75a6f8fee54f4636b25b61f3e8b2805e 100644 (file)
@@ -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