[Python-3000] PEP 3131 roundup
Ka-Ping Yee
python at zesty.ca
Wed Jun 6 03:21:53 CEST 2007
> > A. Should identifiers be allowed to contain any Unicode letter?
>
> Not an open issue; the PEP has been accepted.
The items listed under "A." are concerns that I wanted to be noted
in the PEP, so thanks for listing them.
> > B. Should the default behaviour accept only ASCII identifiers, or
> > should it accept identifiers containing non-ASCII characters?
>
> Added as an open issue.
>
> > C. Should non-ASCII identifiers be optional?
>
> How is that different from B?
C asks "should there be an on/off switch"; B asks whether the
default should be on or off.
> > D. Should the identifier character set be configurable?
>
> Still seems to be the same open issue.
D asks "should you be able to select which character set you want",
which is finer-grained than an all-or-nothing switch.
> > G. Should source code be required to be in normalized form?
>
> Should I add a section "Rejected ideas"? This is out of scope of the PEP.
It seems to me that the issue is directly related -- since the
PEP intends to change the definition of acceptable source code,
ought we not to settle what we're going to accept?
To your earlier question of "what about non-UTF-8 files", I imagine
that the normalization restriction would apply to the decoded characters.
That is, once you know the source code encoding, there's a one-to-one
mapping between the sequence of bytes in the source file and the
sequence of characters to be parsed. Thus, two references to the
same identifier will be represented by exactly the same bytes in the
source file (you can't have different byte sequences in the source
file alias to the same identifier).
-- ?!ng
More information about the Python-3000
mailing list