[Python-ideas] Verbatim names (allowing keywords as names)
Alexandre Brault
abrault at mapgears.com
Fri May 18 02:34:34 EDT 2018
On 2018-05-17 11:02 PM, Neil Girdhar wrote:
>
> For that reason, I'd like to make a more modest proposal to *only* add
> a verbatim versions of keywords as necessary, e.g., "\where" or
> "\given". That way, there will be no temptation to use that syntax in
> any other place. If a new version of Python comes out with a new
> keyword, say "abc", then all of the old Python versions can get a
> minor revision that knows about "\abc". This would ensure that the
> backslash syntax is only used to avoid collisions with new keywords.
>
> When 3.7 hits end-of-life, the "\given" (or whatever) can be deprecated.
-1. This would add an extra maintenance and mental ("which keywords are
allowed as verbatim and which not") cost to the feature while limiting
its utility to the one use case it's only incidentally addressing. PEP8
can warn people not to use verbatim names frivolously in handwritten code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180518/b973060b/attachment.html>
More information about the Python-ideas
mailing list