mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
More bug 460020: when F is a subclass of float, disable the unary plus
optimization (+F(whatever)).
This commit is contained in:
parent
73a1dfe367
commit
0280cf79a7
2 changed files with 7 additions and 2 deletions
|
@ -1401,6 +1401,7 @@ def inherits():
|
|||
a = precfloat(12345)
|
||||
verify(float(a) == 12345.0)
|
||||
verify(float(a).__class__ is float)
|
||||
verify((+a).__class__ is float)
|
||||
|
||||
class madtuple(tuple):
|
||||
_rev = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue