[Python-ideas] Verbatim names (allowing keywords as names)
clint.hepner at gmail.com
Fri May 18 08:50:47 EDT 2018
> On 2018 May 18 , at 7:37 a, Steven D'Aprano <steve at pearwood.info> wrote:
> On Fri, May 18, 2018 at 11:17:13AM +0200, Stephan Houben wrote:
>> And the alternative is to replace all occurrences of
>> spam with 𝐬𝐩𝐚𝐦 , which has the same effect and also is
>> backward-compatible with 3.x for x < 8.
>> So there is already a kind of solution available, albeit an ugly one.
> You are kidding, I hope.
> If that works at all, I don't think its something we want to guarantee
> will work. And for what it's worth, what I see is eight empty boxes
> (missing glyph symbols).
It could be worse. At least 𝐬𝐩𝐚𝐦 ("\U0001d42c\U0001d429\U0001d41a\U0001d426")
is visually distinct with the right font support. You could (ab?)use the Unicode
Tags block (https://en.wikipedia.org/wiki/Tags_(Unicode_block))
and use something like 'spam\U000e0069\U000e0064' (spam<i><d>). (Luckily, that's not
even valid Python, as the tag characters aren't valid for identifiers.)
More information about the Python-ideas