<p dir="ltr">This idea of "visually confusable" seems like a very silly thing to worry about, as others have noted.</p>
<p dir="ltr">It's not just that completely different letters from different alphabets may "look similar", it's also that the similarity is completely dependent on the specific font used for display. My favorite font might have clearly distinguished glyphs for the Cyrillic, Roman, and Greek "A", even if your font uses identical glyphs.</p>
<p dir="ltr">So in this crazy scenario, Python would have to gain awareness of the fonts installed in every text editor and display device of every user.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Jul 21, 2016 12:55 AM, "Chris Angelico" <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On Thu, Jul 21, 2016 at 5:47 PM, Rustom Mody <<a href="mailto:rustompmody@gmail.com">rustompmody@gmail.com</a>> wrote:<br>
>> On Thu, Jul 21, 2016 at 4:26 PM, Rustom Mody <<a href="mailto:rusto...@gmail.com">rusto...@gmail.com</a>> wrote:<br>
>> > IOW<br>
>> > 1. Disallow co-existence of confusables (in identifiers)<br>
>> > 2. Identify confusables to a normal form — like case-insensitive<br>
>> > comparison<br>
>> > and like NKFC<br>
>> > 3. Leave the confusables to confuse<br>
>> ><br>
>> > My choice<br>
>> > 1 better than 2 better than 3<br>
>><br>
>> So should we disable the lowercase 'l', the uppercase 'I', and the<br>
>> digit '1', because they can be confused? What about the confusability<br>
>> of "m" and "rn"? O and 0 are similar in some fonts. And case<br>
>> insensitivity brings its own problems - is "ss" equivalent to "ß", and<br>
>> is "ẞ" equivalent to either? Turkish distinguishes between "i", which<br>
>> upper-cases to "İ", and "ı", which upper-cases to "I".<br>
>><br>
>> We already have interminable debates about letter similarities across<br>
>> scripts. I'm sure everyone agrees that Cyrillic "и" is not the same<br>
>> letter as Latin "i", but we have "AАΑ" in three different scripts.<br>
>> Should they be considered equivalent? I think not, because in any<br>
>> non-trivial context, you'll know whether the program's been written in<br>
>> Greek, a Slavic language, or something using the Latin script. But<br>
>> maybe you disagree. Okay; are "BВΒ" all to be considered equivalent<br>
>> too?  What about "СC"? "XХΧᚷ"? They're visually similar, but they're<br>
>> not equivalent in any other way. And if you're going to say things<br>
>> should be considered equivalent solely on the basis of visuals, you<br>
>> get into a minefield - should U+200B ZERO WIDTH SPACE be completely<br>
>> ignored, allowing "AB" to be equivalent to "A\u200bB" as an<br>
>> identifier?<br>
>><br>
>><br>
><br>
> I said 1 better than 2 better than  3<br>
> Maybe you also want to add:<br>
><br>
> Special cases aren't special enough to break the rules.<br>
> Although practicality beats purity.<br>
><br>
> followed by<br>
><br>
> Errors should never pass silently.<br>
><br>
> IOW setting out 1 better than 2 better than 3 does not necessarily imply its<br>
> completely achievable<br>
<br>
</div>No; I'm not saying that. I'm completely disagreeing with #1's value. I<br>
don't think the language interpreter should concern itself with<br>
visually-confusing identifiers. Unicode normalization is about<br>
*equivalent characters*, not confusability, and I think that's as far<br>
as Python should go.<br>
<div class="elided-text"><br>
ChrisA<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a></div></blockquote></div><br></div>