Message257308
> 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? |
|
Date |
User |
Action |
Args |
2016-01-01 21:38:30 | abarnert | set | recipients:
+ abarnert, gvanrossum, rhettinger, terry.reedy, ncoghlan, r.david.murray, martin.panter, serhiy.storchaka, abarry, curioswati |
2016-01-01 21:38:30 | abarnert | set | messageid: <1451684310.7.0.0101207368203.issue25864@psf.upfronthosting.co.za> |
2016-01-01 21:38:30 | abarnert | link | issue25864 messages |
2016-01-01 21:38:30 | abarnert | create | |
|