PEP 3131: Supporting Non-ASCII Identifiers
René Fleschenberg
rene at korteklippe.de
Tue May 15 07:17:13 EDT 2007
Steven D'Aprano schrieb:
>
>> A Python
>> project that uses Urdu identifiers throughout is just as useless
>> to me, from a code-exchange point of view, as one written in Perl.
>
> That's because you can't read it, not because it uses Unicode. It could
> be written entirely in ASCII, and still be unreadable and impossible to
> understand.
That is a reason to actively encourage people to write their code in
English whereever possible, not one to allow non-ASCII identifiers,
which might even do the opposite.
>> - Unicode is harder to work with than ASCII in ways that are more
>> important
>> in code than in human-language text. Humans eyes don't care if two
>> visually indistinguishable characters are used interchangeably.
>> Interpreters do. There is no doubt that people will accidentally
>> introduce mistakes into their code because of this.
>
> That's no different from typos in ASCII. There's no doubt that we'll give
> the same answer we've always given for this problem: unit tests, pylint
> and pychecker.
Maybe it is no different (actually, I think it is: With ASCII, at least
my terminal font can display all the identifiers in a traceback), but
why do you want to create *more* possibilities to do mistakes?
--
René
More information about the Python-list
mailing list