mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
More on SF bug [#460020] bug or feature: unicode() and subclasses.
Repaired str(i) to return a genuine string when i is an instance of a str subclass. New PyString_CheckExact() macro.
This commit is contained in:
parent
8ff70a9606
commit
5a49ade70e
4 changed files with 10 additions and 3 deletions
|
@ -1440,7 +1440,7 @@ def inherits():
|
|||
verify(u == s)
|
||||
s = madstring("12345")
|
||||
#XXX verify(str(s) == "12345")
|
||||
#XXX verify(str(s).__class__ is str)
|
||||
verify(str(s).__class__ is str)
|
||||
|
||||
class madunicode(unicode):
|
||||
_rev = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue