PEP 3131: Supporting Non-ASCII Identifiers

sjdevnull at yahoo.com sjdevnull at yahoo.com
Wed May 16 00:19:27 EDT 2007


Steven D'Aprano wrote:
> I've made various comments to other people's responses, so I guess it is
> time to actually respond to the PEP itself.
>
> On Sun, 13 May 2007 17:44:39 +0200, Martin v. Lo:wis wrote:
>
> > PEP 1 specifies that PEP authors need to collect feedback from the
> > community. As the author of PEP 3131, I'd like to encourage comments to
> > the PEP included below, either here (comp.lang.python), or to
> > python-3000 at python.org
> >
> > In summary, this PEP proposes to allow non-ASCII letters as identifiers
> > in Python. If the PEP is accepted, the following identifiers would also
> > become valid as class, function, or variable names: Lo:ffelstiel, change,
> > oshibka, or ***ri*** (hoping that the latter one means "counter").
> >
> > I believe this PEP differs from other Py3k PEPs in that it really
> > requires feedback from people with different cultural background to
> > evaluate it fully - most other PEPs are culture-neutral.
> >
> > So, please provide feedback, e.g. perhaps by answering these questions:
> > - should non-ASCII identifiers be supported? why? - would you use them
> > if it was possible to do so? in what cases?
>
> It seems to me that none of the objections to non-ASCII identifiers are
> particularly strong. I've heard many accusations that they will introduce
> "vulnerabilities", by analogy to unicode attacks in URLs, but I haven't
> seen any credible explanations of how these vulnerabilities would work,
> or how they are any different to existing threats. That's not to say that
> there isn't a credible threat, but if there is, nobody has come close to
> explaining it.
>
> I would find it useful to be able to use non-ASCII characters for heavily
> mathematical programs. There would be a closer correspondence between the
> code and the mathematical equations if one could write D(u*p) instead of
> delta(mu*pi).

Just as one risk here:
When reading the above on Google groups, it showed up as "if one could
write ?(u*p)..."
When quoting it for response, it showed up as "could write D(u*p)".

I'm sure that the symbol you used was neither a capital letter d nor a
question mark.

Using identifiers that are so prone to corruption when posting in a
rather popular forum seems dangerous to me--and I'd guess that a lot
of source code highlighters, email lists, etc have similar problems.
I'd even be surprised if some programming tools didn't have similar
problems.




More information about the Python-list mailing list