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

Antoine Pitrou report at bugs.python.org
Tue Apr 29 12:12:04 CEST 2014


Antoine Pitrou added the comment:

For the record, checks such as:

        self.assertEqual(wr() is None, False)

are better written:

        self.assertIsNotNone(wr())

No need to upload a new patch, I'm gonna make the change while committing :-)

----------

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


More information about the Python-bugs-list mailing list