self should be VariableName, not keyword #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "self-not-keyword"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In Python, the variable name
selfis used only by convention and does not actually carry any special meaning. As such, it should be treated as a variable name.The following program is legal, but would require any program using leze-python to handle
VariableName | selftype.Current:
Script(AssignStatement(self,AssignOp,Boolean))Expected:
Script(AssignStatement(VariableName,AssignOp,Boolean))Example of how this currently has to be handled (for all params, lambdas, etc.)
On the topic of self in python, here's an oldy-but-goody on python's use of explicit self (and by extension why it's not a reserved word).
Great to have someone who's more familiar with the language look over the grammar. Merged!
Awesome, marking as closed (since GitHub didn't auto detect?)
Ah, indeed, I rebased over your other PR so it didn't recognize the commit hash.
Pull request closed