Author mark.dickinson
Recipients belopolsky, benjamin.peterson, hpesoj, lehmannro, mark.dickinson, pitrou, rhettinger, stargaming
Date 2009-09-24.20:05:44
SpamBayes Score 1.96605e-09
Marked as misclassified No
Message-id <>
Just to be on the safe side, I changed the PyLong_Check(ob) check to PyLong_CheckExact(ob) || PyBool_Check(ob), in r75051.  Without this, one 
can get different results for 'x in range(10)' and 'x in list(range(10))' 
if x is an instance of a subclass of int:

Python 3.2a0 (py3k:75050, Sep 24 2009, 20:56:13) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class C(int):
...     def __eq__(self, other): return True
>>> C(11) in range(10)
>>> C(11) in list(range(10))
Date User Action Args
2009-09-24 20:05:45mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, belopolsky, pitrou, stargaming, benjamin.peterson, lehmannro, hpesoj
2009-09-24 20:05:45mark.dickinsonsetmessageid: <>
2009-09-24 20:05:44mark.dickinsonlinkissue1766304 messages
2009-09-24 20:05:44mark.dickinsoncreate