[docs] [issue15248] Better explain "TypeError: 'tuple' object is not callable"

Raymond Hettinger report at bugs.python.org
Sun Aug 11 02:01:19 EDT 2019


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

This isn't interacting well with IDLE.

====================================================
--- Works fine at the regular interactive prompt ---

$ python3.8
Python 3.8.0b3 (v3.8.0b3:4336222407, Jul 29 2019, 09:46:03)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> data = [
...          (1, 2, 3) # oops, missing comma!
...          (4, 5, 6)
...      ]
<stdin>:2: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>


====================================================
--- Behaves differently in the IDLE Shell        ---

Python 3.8.0b3 (v3.8.0b3:4336222407, Jul 29 2019, 09:46:03) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> data = [
         (1, 2, 3) # oops, missing comma!
         (4, 5, 6)
     ]
SyntaxError: 'tuple' object is not callable; perhaps you missed a comma?

----------
assignee: docs at python -> terry.reedy
components: +IDLE -Documentation
nosy: +rhettinger
status: closed -> open

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


More information about the docs mailing list