> Not if you need to make changes in the same tens of thousands of lines file.But what has that got to do with the the syntax of the new code? The old code iswhat it is.I did think after I replied that `True` wasn't actually reserved until more recently, butthe point still stands: You would be able to reference the name *as defined* in anexternal library, and yeah, it could refer to anything, but that's kinda the point. Wehave to assume the library does something sane with the name. We can't preemptan employee sabotaging `True`.As a more realistic example (if not for Python), say `until` became a keyword, thenyou could end up with lines like this:from oldlib import until as uptodance(until="am")event.until = time(9, 30)> The overall issue is that python has no way of knowing if the keyword is being used for legitimate> backwards-compatibility purposes or someone intentionally overrode after it was made a keyword> because they somehow thought it was a good idea.I only said that Python does not know *until runtime*, and I was wrong when I described that as aproblem. A runtime NameError actually makes perfect sense. Assigning to `self.until` or assigningto `until` inside a subclass should not be a syntax error. A NameError would be correct.It worth mentioning that the cost of checking only applies to cases where the name in question is alsokeyword, so almost never.-- Carl SmithOn 16 May 2018 at 16:40, Niki Spahiev <niki.spahiev@gmail.com> wrote:On 16.05.2018 16:05, Andrés Delfino wrote:
IMHO, it would be much easier to learn and understand if keywords can only
be used by escaping them, instead of depending where they occur.
There can be 2 escape characters '\' and '.'
Niki
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/