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 <1483434909.67.0.795957330842.issue29116@psf.upfronthosting.co.za>
In-reply-to
Content
> 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)`.
History
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: <1483434909.67.0.795957330842.issue29116@psf.upfronthosting.co.za>
2017-01-03 09:15:09xiang.zhanglinkissue29116 messages
2017-01-03 09:15:09xiang.zhangcreate