Georg Brandl <ge...@python.org> added the comment:

It's defined that way because it's a slot returning a bool, so it doesn't need 
to return anything except for 0 or 1.

Changing this to return a PyObject would mean that every extension module (i.e. 
module written in C) that defines a custom __contains__ would need to be 
adapted.  That is the non-trivial implementation that Benjamin was talking 
about.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13667>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to