[Python-Dev] Backporting PEP 3101 to 2.6

Eric Smith eric+python-dev at trueblade.com
Fri Feb 22 00:37:40 CET 2008

André Malo wrote:
> * Eric Smith wrote:
>> But now that I look at time.strftime in py3k, it's converting the entire
>> unicode string to a char string with PyUnicode_AsString, then converting
>> back with PyUnicode_Decode.
> Looks wrong to me, too... :-)
> nd

I don't understand Unicode encoding/decoding well enough to describe 
this bug, but I admit it looks suspicious.  Could someone who does 
understand it open a bug against 3.0 (hopefully with an example that fails)?

The bug should also mention that 2.6 avoids this problem entirely by not 
supporting unicode with strftime or datetime.__format__, but 2.6 could 
probably leverage whatever solution is developed for 3.0.


More information about the Python-Dev mailing list