Message257308
| Author |
abarnert |
| Recipients |
abarnert, abarry, curioswati, gvanrossum, martin.panter, ncoghlan, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy |
| Date |
2016年01月01日.21:38:30 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1451684310.7.0.0101207368203.issue25864@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> If this patch goes ahead, I think the ABC documentation should clarify which methods are checked for None and which aren’t.
That seems fair.
Also, as you pointed out on #25958, at least one other ABC has the same problem as Iterable: you can block the "in" operator by setting __contains__=None, but you'll still be a Container. So, do we want to go through all of the existing ABCs and make sure they all do this negative check, instead of just Iterable?
> Also, what is the point of the odd __getitem__() method in test_enumerate.py? Maybe you should use assertRaisesRegex() to check that the intended TypeError is actually raised.
If an implementation doesn't raise a TypeError there, that's a failure. If it raises one with a different (possibly less helpful) message, I think that's just a quality-of-implementation issue, isn't it? |
|