[Python-Dev] Import and unicode: part two

Andy Teijelo ateijelo at gmail.com
Thu Jan 20 17:45:54 CET 2011

(Hi, I'm writing from an address different to the one I'm subscribed 
with to the list because I don't have reverse dns in my mail server and 
mail.python.org rejects my messages. I hope that's not much trouble)

Maybe Python should always use an ASCII encodable filename for modules: 
a translation of the module name into an ASCII encodable string that, 
preferrably, was the same as the module name if the module name didn't 
have any non-ASCII characters. Like, if the code said:

import cafe

Python would look for a file named:


but if the code said:

import café

then Python would look, in any platform, for a file named:

café.py  or  café.py  or something nicer.

Something along the lines of xmlcharrefreplace.
Just an idea.


El 1/20/11 12:21 a.m., Glyph Lefkowitz escribió:
> On Jan 20, 2011, at 12:19 AM, Glenn Linderman wrote:
>> Now if the stuff after m_ was the hex UTF-8 of "café", that could get
>> interesting :)
> (As it happens, it's the hex digest of the MD5 of the UTF-8 of café... ;-))
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/andy%40lists.teijelo.net

More information about the Python-Dev mailing list