[Python-3000] basestring removal, __file__ and co_filename

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Oct 12 01:33:17 CEST 2007


Christian Heimes wrote:
> I like to perform
> 
> filename = PyString_AsDecodedObject(filename,
> Py_FileSystemDefaultEncoding ? Py_FileSystemDefaultEncoding : "UTF-8",
> NULL);
> 
> in order to decode the string with either the fs encoding or UTF-8 but
> it's not possible. It's way too early in the bootstrapping process

How about just using ascii if the codec system isn't fully
operational? It would just mean that files needed during
bootstrapping would need to have pure-ascii filenames,
which doesn't seem like a serious restriction.

--
Greg


More information about the Python-3000 mailing list