4 Oct
2011
4 Oct
'11
12:09 a.m.
Nick Coghlan dixit (2011-10-03, 18:00): [...]
duck-typed check for __contains__ would break for classes that explicitly raise TypeError, as is proposed for _BaseIO).
Maybe there should be possible to explicitly disallow the 'in' test by setting __contains__ to None (similar to already settled __hash__=None for non-hashables). Cheers. *j