[Python-3000] basestring removal, __file__ and co_filename

Guido van Rossum guido at python.org
Thu Oct 11 19:40:21 CEST 2007


Um, where does the filename object in that expression come from? It
appears to be a PyString object. Who created it? That could should be
changed to create a PyUnicode instead (using the filesystem encoding).

On 10/11/07, Christian Heimes <lists at cheimes.de> wrote:
> Guido van Rossum wrote:
> > Hm, can't we make co_filename a PyUnicode instance?
>
> I already did it in my patch but doesn't it cause a problem when the
> encoding isn't UTF-8? I may understand
> PyUnicode_FromString(PyString_AS_STRING(filename)) wrong. Doesn't it
> decode filename from UTF-8?
>
> Christian
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list