Operator: inappropriate wording?

elas tica elasstiika at gmail.com
Wed Nov 2 18:22:57 EDT 2022


Le lundi 31 octobre 2022 à 22:18:57 UTC+1, Chris Angelico a ecrit :
> Wording is hard. Just ask the SQL standard whether NULL is a value. 
> 

Indeed, but I think our problem here is simpler ;)

One could for example omit the incorrect term "operator" while remaining unambiguous. This would give:

If the object is a class instance and the attribute reference occurs on both sides of the assignment, the right-hand side expression,...

Now, as for the other formulation from the reference document:

The second half of the list, the augmented assignment operators, serve lexically as delimiters, but also perform an operation.

(link: https://docs.python.org/3/reference/lexical_analysis.html#delimiters)

it is incorrect (as explained by the FAQ I quoted in my last post) and the explanations it gives are even more incorrect suggesting that anything that performs an operation is the result of the action of an operator. Under these conditions, we could say that del is an operator and even that return is an operator!


I opened an issue on the CPython GitHub repository, here: https://github.com/python/cpython/issues/98814







More information about the Python-list mailing list