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. ---------- nosy: +christian.heimes _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16011> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com