[Python-3000] PEP 3131 accepted

Ka-Ping Yee python at zesty.ca
Thu May 24 00:02:01 CEST 2007


On Wed, 23 May 2007, Ka-Ping Yee wrote:
> So there are three sets of characters that look the same:
>
>     U+02BB = U+0312 = U+2018
>     U+02BC = U+0313 = U+0315 = U+2019
>     U+02EE = U+201D

The Greek combining koronis, U+0343, is an allowed identifier
character and also looks identical to a single right quote,
U+02BC = U+0313 = U+0315 = U+0343 = U+2019.

> U+0312, U+0313, and U+0315 are combining characters that cause the
> comma to appear over the preceding letter, and they are not allowed
> to appear as the first character in an identifier.  So, if your
> editor displays combining characters as properly combined, they will
> not be confusable with quotation marks; otherwise, they could be.

I just realized that this is not the whole story.  There's no
requirement that a combining character has to actually come
after a character it can be combined with.  So there might be
valid identifiers containing sequences of characters that don't
have a sensible rendering, or that force the combining comma to
appear separately and thus indistinguishable from a quotation
mark even in a Unicode-aware editor.


-- ?!ng


More information about the Python-3000 mailing list