Update numbers.rst (GH-31995)

(cherry picked from commit dde8a1668e)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-05-11 00:36:24 -07:00 committed by GitHub
parent b162f0875d
commit a9b5bc3274
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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