[Python-ideas] __contains__=None (was: __iter__ implies __contains__?)

Raymond Hettinger raymond.hettinger at gmail.com
Tue Oct 4 04:35:08 CEST 2011


On Oct 3, 2011, at 8:09 PM, Jan Kaliszewski wrote:

> 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).

We need fewer arcane rules -- not more of them.


Raymond

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111003/c1c5ab68/attachment.html>


More information about the Python-ideas mailing list