Update numbers.rst (#31995)

This commit is contained in:
Géry Ogam 2022-05-10 20:01:49 +02:00 • committed by GitHub
parent 392fd272cd
commit dde8a1668e
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