]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update numbers.rst (#31995)
authorGéry Ogam <gery.ogam@gmail.com>
Tue, 10 May 2022 18:01:49 +0000 (20:01 +0200)
committerGitHub <noreply@github.com>
Tue, 10 May 2022 18:01:49 +0000 (13:01 -0500)
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