[Python-Dev] unicode inconsistency? (original) (raw)
Tim Peters tim.peters at gmail.com
Thu Sep 9 21:28:39 CEST 2004
- Previous message: [Python-Dev] unicode inconsistency?
- Next message: [Python-Dev] unicode inconsistency?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Batista, Facundo]
You mean something like %u? (actually don't know if the "u" is used for something else)
'%u' is used for unsigned int formats -- although int/long unification rendered those senseless.
If %u triggers PyObjectUnicode(), the following will work?
class A: def unicode(self): return u'\u1234' '%u' % u'\u1234' '%u' % A()
That's the intent, yes. Neil's original example would also "work" then (because unlike PyObject_Str(), PyObject_Unicode() is happy to accept a unicode result as-is from a tp_str implementation).
- Previous message: [Python-Dev] unicode inconsistency?
- Next message: [Python-Dev] unicode inconsistency?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]