[issue2690] Precompute range length

Alexander Belopolsky report at bugs.python.org
Mon Apr 28 23:47:59 CEST 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Reviewing my own patch (range-sequence.diff), I've realized that it is 
being a bit too clever in handling x in range(..) where x is not an 
integer.  It seems that upon a failed PyLong_Check, range_contains should 
just do a linear search.  This is easy to implement, but I will wait for 
more feedback before posting further changes.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2690>
__________________________________


More information about the Python-bugs-list mailing list