Issue 1456: unexpected iterator behavior with removal
Created on 2007-11-18 04:32 by JosephArmbruster, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| listobjectpatch.patch | JosephArmbruster, 2007-11-18 04:32 | |||
| Messages (2) | |||
|---|---|---|---|
| msg57611 - (view) | Author: Joseph Armbruster (JosephArmbruster) | Date: 2007-11-18 04:32 | |
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. |
|||
| msg57612 - (view) | Author: Christian Heimes (christian.heimes) * ![]() |
Date: 2007-11-18 04:37 | |
Closed as discussed on IRC. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:28 | admin | set | github: 45797 |
| 2007-11-18 04:37:20 | christian.heimes | set | status: open -> closed resolution: not a bug messages: + msg57612 nosy: + christian.heimes |
| 2007-11-18 04:32:13 | JosephArmbruster | create | |
