[Python-3000] PEP 3131 roundup

Jim Jewett jimjjewett at gmail.com
Wed Jun 6 23:43:15 CEST 2007


On 6/5/07, Steve Howell <showell30 at yahoo.com> wrote:
>
> --- Jim Jewett <jimjjewett at gmail.com> wrote:

> > Ideally, either that equivalence would also include
> > compatibility, or
> > else characters whose compatibility and canonical
> > equivalents are
> > different would be banned for use in identifiers.

> Current Python has the precedence that color/colour
> are treated as two separate identifers, as are
> metre/meter, despite the equivalence of "o" to "ou"
> and "re" to "er," and I don't think that burns too
> many people.  So I'm +1 on the unquoted third option,
> that canonically equivalent, but differently encoded,
> Unicode characters are allowed yet treated as
> different.

> Am I stretching the analogy too far?

I think so.  As best I can judge,  "color/colour" is arguably a
compatibility equivalent, but is not a canonical equivalent.

A better analogy for canonical equivalence would be "color" typed on a
PC vs "color" typed on an old EBCDIC mainframe terminal.  In that
particular case, I think the re-encoding to unicode would be able to
use the same code points, but that "mostly invisible; might need it
for a round-trip" level of difference is the sort of thing expressed
by different code points with canonical equivalence.

-jJ


More information about the Python-3000 mailing list