[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

Anton Afanasyev report at bugs.python.org
Tue Apr 29 11:55:51 CEST 2014


Anton Afanasyev added the comment:

Hi Antoine,
oops you are right about leaks: fixed them in new attached patch.
As for testing changes in "reduce()": they are already covered by "self.pickletest(islice(range(100), *args))". Function "pickletest()" covers case for pickle dumping/loading of exhausted iterator.

----------
Added file: http://bugs.python.org/file35091/issue21321_3.4_8c8315bac6a8_5.diff

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


More information about the Python-bugs-list mailing list