mirror of
https://github.com/python/cpython
synced 2026-09-29 09:55:31 +03:00
Update numbers.rst (#31995)
This commit is contained in:
parent
392fd272cd
commit
dde8a1668e
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