Operator: inappropriate wording?
elas tica
elasstiika at gmail.com
Wed Oct 26 15:01:04 EDT 2022
Quotes from The Python Language Reference, Release 3.10.8:
- Note that tuples are not formed by the parentheses, but rather by use of the comma operator (p. 66)
- Note: If the object is a class instance and the attribute reference occurs on both sides of the assignment operator (p. 86)
- The second half of the list, the augmented assignment operators, serve lexically as delimiters, but also perform an operation (p. 15)
Do you agree with this use of the term "operator"?
Because there is no such "comma operator" in Python as explained by the official FAQ: https://docs.python.org/3/faq/programming.html#what-s-up-with-the-comma-operator-s-precedence
And, =, += and the like are not operators since (a=b), (a+=b), etc have no value. There is no assignment operator instead there exists an assignment statement. The only assignment operator I can figure out is the walrus operator. To confirm, The Python Language Reference gives here:
https://docs.python.org/3/reference/lexical_analysis.html#operators
the set of tokens considered as operator and the =, += tokens are not listed whereas := is.
More information about the Python-list
mailing list