This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients Jim Fasarakis-Hilliard, ned.deily, serhiy.storchaka, xiang.zhang
Date 2017-01-03.09:15:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> As for `operator.concat`, any reason why the check is made beforehand to see if the first argument has a `__getitem__` method?

Concatenation is an operation of sequence (+ could be used both for concatenation and addition), so you have to check __getitem__ to make sure it's a sequence.

> Couldn't that just be removed allowing the exception from `concat(1, '')` to just propagate to the caller?

If removed, `concat(1, '')` could propagate exceptions but not `concat(1, 1)`.
Date User Action Args
2017-01-03 09:15:09xiang.zhangsetrecipients: + xiang.zhang, ned.deily, serhiy.storchaka, Jim Fasarakis-Hilliard
2017-01-03 09:15:09xiang.zhangsetmessageid: <>
2017-01-03 09:15:09xiang.zhanglinkissue29116 messages
2017-01-03 09:15:09xiang.zhangcreate