[Python-3000] String to unicode fixes in time and datetime

Ero Carrera ero.carrera at gmail.com
Fri Aug 24 02:55:03 CEST 2007


Hi,

I'm attaching a small patch result of attempting to tackle part of  
one of the tasks in the Google Sprint.
The patch removes most of the references of PyString_* calls in the  
"time" and "datetime" modules and adds Unicode support instead.

There's a problem in "datetime" with  
"_PyUnicode_AsDefaultEncodedString". As there's no current equivalent  
that would provide an object of type "bytes", there are two  
occurrences of PyString_* functions to handle the returned "default  
encoded string" and convert it into bytes.

cheers,
--
Ero


-------------- next part --------------
A non-text attachment was scrubbed...
Name: time_datetime_pystring_patch.diff
Type: application/octet-stream
Size: 9162 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-3000/attachments/20070823/8b0f0b34/attachment.obj 


More information about the Python-3000 mailing list