Possibly the end of SF [#460020] bug or feature: unicode() and subclasses.
Changed unicode(i) to return a true Unicode object when i is an instance of
a unicode subclass. Added PyUnicode_CheckExact macro.
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index fea3255..a2ec475 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1443,7 +1443,7 @@
verify(str(s).__class__ is str)
s = madstring("\x00" * 5)
- #XXX verify(str(s) == "\x00" ( 5)
+ #XXX verify(str(s) == "\x00" * 5)
verify(str(s).__class__ is str)
class madunicode(unicode):
@@ -1460,7 +1460,7 @@
verify(u.rev().rev() == madunicode(u"ABCDEF"))
u = madunicode(u"12345")
verify(unicode(u) == u"12345")
- #XXX verify(unicode(u).__class__ is unicode)
+ verify(unicode(u).__class__ is unicode)
def all():
lists()