This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, larry, rhettinger, serhiy.storchaka
Date 2016-03-06.16:04:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457280280.79.0.892048425987.issue26492@psf.upfronthosting.co.za>
In-reply-to
Content
There is general rule that after raising StopIteration the iterator should always raise StopIteration even if new data is added to iterating sequence. Array iterators don't obey this rule.

Proposed patch makes array iterator to left in exhausted state since it achieved. As a side (or may be primary) effect of this change, iterating sequence can be freed just after iterating is finished.

Added tests for other iterators of resizable sequences.

I don't know whether this patch should be applied to maintained releases or only to default branch. Note that array pickling tests broken by this patch were just added. They just expose current (presumably incorrect) behavior.
History
Date User Action Args
2016-03-06 16:04:40serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, larry, benjamin.peterson
2016-03-06 16:04:40serhiy.storchakasetmessageid: <1457280280.79.0.892048425987.issue26492@psf.upfronthosting.co.za>
2016-03-06 16:04:40serhiy.storchakalinkissue26492 messages
2016-03-06 16:04:40serhiy.storchakacreate