[docs] [issue16011] "in" should be consistent with return value of __contains__

R. David Murray report at bugs.python.org
Tue Feb 7 21:10:39 EST 2017


R. David Murray added the comment:

>>> bool(())
False
>>> bool([])
False
>>> bool('')
False

What you want to say is that 'in' coerces the result returned by __contains__ to a boolean value.

----------

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


More information about the docs mailing list