[Python-Dev] Import and unicode: part two

Atsuo Ishimoto ishimoto at gembook.org
Fri Jan 21 06:44:48 CET 2011


On Fri, Jan 21, 2011 at 1:46 AM, Guido van Rossum <guido at python.org> wrote:
> On Thu, Jan 20, 2011 at 5:16 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On Thu, Jan 20, 2011 at 10:08 PM, Simon Cross
>> <hodgestar+pythondev at gmail.com> wrote:
>>> I'm changing my vote on this to a +1 for two reasons:
>>>
>>> * Initially I thought this wasn't supported by Python at all but I see
>>> that currently it is supported but that support is broken (or at least
>>> limited to UTF-8 filesystem encodings). Since support is there, might
>>> as well make it better (especially if it tidies up the code base at
>>> the same time).
>>>
>>> * I still don't think it's a good idea to give modules non-ASCII names
>>> but the "consenting adults" approach suggests we should let people
>>> shoot themselves in the foot if they believe they have good reason to
>>> do so.
>>
>> I'm also +1 on this for the reasons Simon gives.
>
> Same here. *Most* code will never be shared, or will only be shared
> between users in the same community. When it goes wrong it's also a
> learning opportunity. :-)
>

I don't want Python to encourage people to use non-ascii module names.
Today, seeing UnicodeEncodingError is one of popular reasons for
newbies to abandon learning Python in Japan. Non-ascii module name is
an another source of confusion for newbies.

Experienced Japanese programmers may not use non-ascii module names to
avoid encoding issues.

But novice programmers or non-programmers willing to learn programming
with Python will wish to use Japanese module names. Their programs
will stop working if they copy them to another environment. Sooner or
later, they will see storange ImportError and will start complaining
"Python sucks! Python doesn't support Japanese!" on Twitter.

Copying files with non-ascii file name over platform is not easy as it
sounds. What happen if I copy such files from OSX to my web hosting
server ? Results might differ depending on tools I use to copy and
platforms.

Is it a good opportunity to start learnig abound encodings? I don't
think so. They should learn concepts of charater set and encodings,
Unicode and JIS character sets, some kind of Japanse encodings, number
of platform specifix issues, non-standard extention of Microsoft and
Apple, and so on. I think they should defer learning these messes
until they get ready.

-- 
Atsuo Ishimoto
Mail: ishimoto at gembook.org
Blog: http://d.hatena.ne.jp/atsuoishimoto/
Twitter: atsuoishimoto


More information about the Python-Dev mailing list