mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
More for SF bug [#460020] bug or feature: unicode() and subclasses
Repair float constructor to return a true float when passed a subclass instance. New PyFloat_CheckExact macro.
This commit is contained in:
parent
c6249e9fef
commit
7a50f2536e
3 changed files with 7 additions and 2 deletions
|
@ -1372,7 +1372,7 @@ def inherits():
|
|||
verify(repr(precfloat(1.1)) == "1.1")
|
||||
a = precfloat(12345)
|
||||
#XXX verify(float(a) == 12345.0)
|
||||
#XXX verify(float(a).__class__ is float)
|
||||
verify(float(a).__class__ is float)
|
||||
|
||||
class madtuple(tuple):
|
||||
_rev = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue