Message204653
| Author |
cost6 |
| Recipients |
cost6 |
| Date |
2013年11月28日.14:03:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1385647398.27.0.505205145304.issue19823@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
for-each does not iterate over all entries of collection, if one removes elements during the iteration.
Example (misbehaving) code:
def keepByValue(self, key=None, value=[]):
for row in self.flows:
if not row[key] in value:
flows.remove(row) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年11月28日 14:03:18 | cost6 | set | recipients:
+ cost6 |
| 2013年11月28日 14:03:18 | cost6 | set | messageid: <1385647398.27.0.505205145304.issue19823@psf.upfronthosting.co.za> |
| 2013年11月28日 14:03:18 | cost6 | link | issue19823 messages |
| 2013年11月28日 14:03:17 | cost6 | create |
|