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

2007-08-23 Thread Guido van Rossum
Hi Ero, Thanks for these! I checked them in. The datetime patch had a few problems (did you run the unit test?) that I got rid of. The function you were looking for does exist, it's PyUnicode_AsUTF8String(). (which returns a new object instead of a borrowed reference). I changed your code to use

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

2007-08-23 Thread Ero Carrera
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 "_PyUnico