[docs] [issue11988] special method lookup docs don't address some important details

Eric Snow report at bugs.python.org
Tue May 3 23:18:14 CEST 2011

Eric Snow <ericsnowcurrently at gmail.com> added the comment:

In 2.7 I get the following (if Y does not inherit from object):

>>> print('res:', 1 in y)
('X contains:', 1)
('res:', False)

This makes sense with old style classes.  With Y(object):

>>> print('res:', 1 in y)
Y iter
('res:', True)

nosy: +ericsnow

Python tracker <report at bugs.python.org>

More information about the docs mailing list