mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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:
parent
b162f0875d
commit
a9b5bc3274
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue