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

Serhiy Storchaka report at bugs.python.org
Sat Aug 5 00:38:34 EDT 2017


Serhiy Storchaka added the comment:

Terry, this proposition doesn't change the behavior. It moves the iterator forward during searching. The only effect is inlining __next__ in a loop and getting rid of the overhead of few indirections and calls.

----------

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


More information about the Python-bugs-list mailing list