[Python-ideas] Verbatim names (allowing keywords as names)
Stephan Houben
stephanh42 at gmail.com
Fri May 18 05:17:13 EDT 2018
2018-05-18 8:05 GMT+02:00 Greg Ewing <greg.ewing at canterbury.ac.nz>:
> Steven D'Aprano wrote:
>
>> It's Python 3.8, and I learn that in 4.0 "spam" is going to become a
>> keyword. I simply take my code and change all the references spam to \spam,
>> and I've future-proofed the code for 4.0 while still keeping compatibility
>> with 3.8 and 3.9.
>>
>
> Okay, maybe it helps a little bit, but not very much. There
> will still be a lot of reluctance to add new keywords, because
> of the disruption it will cause to existing code
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.
Stephan
If we've learned nothing else from the Python 3 changeover,
> it's that many people work in an environment where it's
> extremely difficult to update working code.
>
> --
> Greg
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180518/c1c5e15b/attachment.html>
More information about the Python-ideas
mailing list