Closed orlp closed 9 years ago
This is a good idea. Also, I'd like to restructure how syntactic sugar works. I'm going to move it from data.py
to pyth.py
.
One edge case is that to continue to allow tuple assignment, we should not apply the sugaring to ,
.
Implemented.
Now that assignment is an expression the following isn't unambiguous anymore:
This could mean "Assign T to Z and return Z + 1", or it could mean "Add T to Z and print 1".
I'd suggest that we swap the ordering for augmented assignment:
There is only one interpretation possible for this -
Z += T; print(1)
.