<div dir="ltr">2018-05-18 13:37 GMT+02:00 Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Fri, May 18, 2018 at 11:17:13AM +0200, Stephan Houben wrote:<br>
<br>
> And the alternative is to replace all occurrences of<br>
> spam with π¬π©πšπ¦ , which has the same effect and also is<br>
> backward-compatible with 3.x for x < 8.<br>
> <br>
> So there is already a kind of solution available, albeit an ugly one.<br>
<br>
</span>You are kidding, I hope.<br></blockquote><div><br><br></div><div>I am not kidding; I am merely defending the status quo.<br></div><div>I demonstrate how the intended behavior can be achieved using features<br></div><div>available in current Python versions. <br></div><div><br></div><div>The approach has at least the following two technical advantages.<br></div><div>1. It requires no change to Python<br></div><div>2. It provides backwards compatibility all the way back to 3.0.<br><br></div><div>The spelling is arguably ugly, but this should be weighted against<br></div><div>the, IMHO, extremely rare use of this feature.<br></div><div>Β </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
If that works at all, I don't think its something we want to guarantee <br>
will work. </blockquote><div><br>It is guaranteed to work by PEP-3131:<br><a href="https://www.python.org/dev/peps/pep-3131">https://www.python.org/dev/peps/pep-3131</a><br><br>"All identifiers are converted into the normal form NFKC while parsing;
comparison of identifiers is based on NFKC."<br><br></div><div>NFKC normalization means <span class="gmail-">spam must be considered the same identifier as π¬π©πšπ¦ .<br><br></span></div><div><span class="gmail-">Note that the choice for NFKC normalization was apparently explicitly discussed and decided upon at the time.<br></span></div><div><span class="gmail-">Since the difference between NFC and NFKC is exactly that identifiers like spam andΒ  <span class="gmail-">𝐬𝐩𝐚𝐦</span> are different<br></span></div><div><span class="gmail-">under the former and identical under the latter, I take it this is all quite intentional.<br></span></div><div><br></div><div>Β </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And for what it's worth, what I see is eight empty boxes <br>
(missing glyph symbols).<br>
<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>I am afraid that mostly shows that your mailer has a bug in handling non-BMP unicode<br></div><div>characters; you should be seeing FOUR missing glyph symbols.<br><br></div><div>Stephan<br></div><div>Β </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888">
<br>
-- <br>
Steve<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5">______________________________<wbr>_________________<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/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</div></div></blockquote></div><br></div></div>