New submission from Joseph Armbruster:

Trunk Revision: 58651

Example of potential issue:

>>> a = [1,2,3,4,5]
>>>
>>> for x in a:
...   a.remove(x)
...
>>>
>>> a
[2, 4]


If this is the expected behavior of iteration in this case, my
apologies.  If this is not, I believe the issue lies in that
listiter_next does not act correctly after a listremove has occurred.

My knowledge of Python development is practically 0, so please take the
patch with a grain of salt.

----------
components: Interpreter Core
files: listobjectpatch.patch
messages: 57611
nosy: JosephArmbruster
severity: normal
status: open
title: unexpected iterator behavior with removal
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file8769/listobjectpatch.patch

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1456>
__________________________________

Attachment: listobjectpatch.patch
Description: Binary data

_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to