[Python-Dev] Import and unicode: part two

Simon Cross hodgestar+pythondev at gmail.com
Wed Jan 19 22:05:41 CET 2011

On Wed, Jan 19, 2011 at 10:32 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> I am a little shocked at the so-far tepid response to (a), so let me
> defend and explain my claim that it is a bug.
> In the simplest case (from 6.11. The import statement and  2.3. Identifiers
> and keywords)
> import_stmt ::= "import" module
> module      ::= indentifier
> identifier  ::= <appropriate Unicode start and continue chars>
> There is nothing, nothing, about any restriction on identifiers.

I have no problem with non-ASCII module identifiers being valid
syntax. It's a question of whether attempting to translate a non-ASCII
module name into a file name (so the file can be imported) is a good
idea and whether these sorts of files can be safely transferred among
diverse filesystems.

For similar reasons we tend to avoid capital letters in module names.


More information about the Python-Dev mailing list