[issue42118] TypeError gives wrong reserved name

Eric V. Smith report at bugs.python.org
Thu Oct 22 12:38:14 EDT 2020


Eric V. Smith <eric at trueblade.com> added the comment:

I should point out that this is the same as doing:

>>> ''()
<stdin>:1: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' object is not callable

Except for the SyntaxWarning part, where the compiler is trying to be helpful.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42118>
_______________________________________


More information about the Python-bugs-list mailing list