[issue13667] __contains__ method behavior

Georg Brandl report at bugs.python.org
Wed Dec 28 11:37:11 CET 2011


Georg Brandl <georg at python.org> added the comment:

Well, usually what you want *is* a boolean indicating whether the element is in the collection or not.

Being able to overload "in", mostly for metaprogramming purposes, is a request that probably nobody thought of when implementing "in".

----------
nosy: +benjamin.peterson, pitrou -docs at python
versions:  -Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13667>
_______________________________________


More information about the Python-bugs-list mailing list