New submission from Ben Longbons <b.r.longb...@gmail.com>: I frequently construct lists of tuples, such as: [ (1, 2, 3) # oops, missing comma! (4, 5, 6) ]
It would be nice if the error message gave a hint on what was *actually* wrong. Although I always use homogeneous containers, the type that's not callable could be something other than 'tuple'. You could possibly cut down on false positives (at the risk of false negatives) by checking that the not-callable object is newly constructed. A better way to cut down on false positives would be to check that a list, tuple, or set is being constructed from a literal, but this might be more complex. ---------- messages: 164637 nosy: o11c priority: normal severity: normal status: open title: In "TypeError: 'tuple' object is not callable", suggest a comma. type: enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15248> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com