On 1/19/2011 8:39 PM, Toshio Kuratomi wrote:
use this::
    import cafe as café

When you do things this way you do not have to translate between unknown
encodings into unicode.  Everything is within python source where you have
a defined encoding.

This is a great way of converting non-portable module names, if the module ever leaves the bounds of its computer, and runs into problems there.

It may be that the best practices for writing platform portable modules should include
* ASCII module filenames
* Code that can handle 16 or 32 bit Unicode
* and likely some other things.

But for local code, having to think up an ASCII name for a module rather than use the obvious native-language name, is just brain-burden when creating the code.

Your demonstration of such an easy solution to the concerns you raise convinces me more than ever that it is acceptable to allow non-ASCII module names. For those programmers in a single locale environment, it'll just work. And for those not in a single locale environment, there is your above simple solution to achieve portability without changing large numbers of lines of code.

Glenn
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to