Vedran Čačić <[email protected]> added the comment:
Nick, thanks for validating my pain. :-|
In the meantime, I found out Python already knows more finely what kind of
expression something is, and uses that knowledge in the error messages. Look:
>>> a + b = 4
SyntaxError: can't assign to operator
>>> a(b) = 4
SyntaxError: can't assign to function call
>>> 'a' = 4
SyntaxError: can't assign to literal
So, how about "keyword argument name cannot be an operator / function call /
literal"? (Of course, if you ask me, "operator" is also unfortunate, but at
least there is a precedent.)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue30858>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com