[Python-ideas] Make keywords KEYwords only in places they would have syntactical meaning
rosuav at gmail.com
Fri May 18 08:03:17 EDT 2018
On Fri, May 18, 2018 at 9:59 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> That's even assuming such a context-sensitive grammar would be possible
> within the requirement that Python's parser is LL(1).
I'm sure it could be done, but it may impact existing Python grammar.
So backward compatibility might mean making certain words "keywords"
in contexts where they otherwise wouldn't be, and then just throwing
SyntaxError because it would have been ambiguous.
But even if it's possible, I don't think it's desirable.
More information about the Python-ideas