[docs] [issue16011] "in" should be consistent with return value of __contains__
report at bugs.python.org
Mon Sep 24 02:26:10 CEST 2012
Christian Heimes added the comment:
The internal API is limited to flags as the sq_contains slot and the API function can only return an int:
PyAPI_FUNC(int) PySequence_In(PyObject *o, PyObject *value)
In order to return the Python object we'd have to alter the API which we can't do as the type slot and the function is part of the stable API and ABI.
A doc update should explain why the code doesn't behave as you expect it.
Python tracker <report at bugs.python.org>
More information about the docs