2 ms·
The naming is odd, because the syntax hasn't changed, only the semantics of some operators have changed. An example of syntactic sugar is list comprehensions.
by exDM69 10y ago
The naming is odd, because the syntax hasn't changed, only the semantics of some operators have changed.
An example of syntactic sugar is list comprehensions. It's a new syntax for expressions using map, filter, etc. It's "new" syntax for something that can be described in terms of the "old" syntax without altering the semantics.
Given the name, I was expecting some kind of macro system or hacks to the Python parser.
- czheo 10y agoYes, I agree with you. Strictly speaking, I was creating new semantics of the operators which looks like "new" syntax, to mimic "syntactic sugar". But I have no idea how to name this in a more understandable way.