[issue31108] add __contains__ for list_iterator (and others) for better performance

Terry J. Reedy report at bugs.python.org
Sat Aug 5 00:56:40 EDT 2017


Terry J. Reedy added the comment:

Sorry, I mistakenly assumed, without carefully checking the C code, that the speedup was from checking the underlying collection, without advancing the iterator.  I presume that " ++it->it_index;" is the statement to the contrary. I should have either asked or found this sooner.  I unlinked the noisy comment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31108>
_______________________________________


More information about the Python-bugs-list mailing list