[Python-3000] Support for PEP 3131
"Martin v. Löwis"
martin at v.loewis.de
Mon Jun 11 05:07:06 CEST 2007
>> Indeed, PEP 3131 gives a predictable identifier character set.
>> Adding per-site options to change the set of allowable characters
>> makes it less predictable.
>>
> true. However, this will only matter if you distribute code with non-ASCII
> identifiers to the wider public.
No - it will matter for any kind of distribution, not just to the "wider
public". If I move code to the next machine it may stop working, or
if I upgrade to the next Python version, assuming the default is
to restrict identifiers.
> The real question is: transparent *to whom*. Transparent to the developper
> himself when he rereads his own code (which I value as a developper), or
> transparent to the user of the program when he tries to fix a bug (which I value
> as a user of open-source software) ? Non-ASCII identifiers are marginally better
> for the first case, but can be dramatically worse for the second one. Clearly,
> there is a tradeoff.
Why do you say that? Non-ASCII identifiers significantly improve the
readability of code to speakers of the natural language from which
the identifiers are drawn. With ASCII identifiers, the reader needs
to understand the English words, or recognize the transliteration.
With non-ASCII identifiers, the intended meaning of the class or
function becomes immediately apparent, in the way identifiers have
always been self-documentation for English-speaking people.
>>> That is what makes these strengths so important. I hope this
>>> helps you understand why these concerns can't and shouldn't be
>>> brushed off as "paranoia" -- this really has to do with the
>>> core values of the language.
>> It just seems that the concerns don't directly follow from
>> the principles. Something else has to be added to make that
>> conclusion. It may not be paranoia (i.e. excessive anxiety),
>> but there surely is some fear, no?
>>
> That argument is not really honest :-) Every risk can be estimated opimistically
> or pessimistically. In both cases, there is some part of irrationallity.
Still, what is the risk being estimated? Is it that somebody
maliciously tries to provide patches that use look-alike
characters? I honestly don't know what risks you see.
Regards,
Martin
More information about the Python-3000
mailing list