Jim Fasarakis-Hilliard added the comment: Should that message be the one predominantly used for sequences, i.e:
TypeError: can only concatenate class1 (not "class2") to class1 or should another one be used like "Unsupported operand type(s) for op: 'class1' and 'class2'? The first is problematic with cases like `+=` where an iterable is accepted, the second seems better to me at least. As for `operator.concat`, any reason why the check is made beforehand to see if the first argument has a `__getitem__` method? Couldn't that just be removed allowing the exception from `concat(1, '')` to just propagate to the caller? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29116> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com