[Python-3000] PEP 3112

"Martin v. Löwis" martin at v.loewis.de
Tue May 8 00:02:58 CEST 2007

>> 1. in Grammar changes: Each shortstringchar or longstringchar must
>>    be a character whose Unicode ordinal value is between 1 and
>>    127 inclusive.
> Sounds like a good fix to me; I agree that bytes literals, like
> Unicode literals, should not vary depending on the source encoding. In
> step 2, can't you use "ascii" as the encoding?

Sure. Technically, ASCII might include \0 (depending on definition),
but that is ruled out as a character in Python source code, anyway.

So: "must be an ASCII character" is just as clear, and much shorter.

I guess Jason associated "ASCII character" with "single byte",
so it can't be simultaneously both ASCII and Unicode, hence he
chose the more elaborate wording.  Of course, if one views ASCII
as a character set (rather than an coded character set), a Unicode
character may or may not simultaneously be an ASCII character.


More information about the Python-3000 mailing list