[pypy-issue] [issue1131] in operator: return value of __contains__ is not coerced to bool
Thomas Waldmann
tracker at bugs.pypy.org
Tue Apr 17 00:15:59 CEST 2012
New submission from Thomas Waldmann <tw-public at gmx.de>:
cpython 2.7 applies a bool() conversion to the return value of __contains__.
pypy 1.8 does not. if one returns an integer, the result of the "in" operator is
that integer.
(I noticed this with a failing unit test in whoosh, it only fails for pypy.)
----------
messages: 4264
nosy: ThomasWaldmann, pypy-issue
priority: bug
release: 1.8
status: unread
title: in operator: return value of __contains__ is not coerced to bool
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1131>
________________________________________
More information about the pypy-issue
mailing list