#3417 closed defect (fixed)

Audit existing ported modules for del in for loops

Reported by: itamarst Owned by: itamarst
Priority: normal Milestone: Support Python 3
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description (last modified by exarkun)

for k in d.keys():
    if something(x): del d[x]

is a bug in Python 3.

Easiest way to catch potential places this might be an issue is probably to run futurize on all ported modules, and then look at diffs.

Change History (4)

comment:1 Changed at 2020-09-28T16:36:44Z by itamarst

  • Keywords review added

comment:2 Changed at 2020-09-28T18:40:16Z by exarkun

  • Description modified (diff)

comment:3 Changed at 2020-09-28T19:04:32Z by exarkun

  • Keywords review removed
  • Owner set to itamarst

comment:4 Changed at 2020-09-28T20:53:17Z by GitHub <noreply@…>

  • Resolution set to fixed
  • Status changed from new to closed

In c84a2ef/trunk:

Merge pull request #835 from tahoe-lafs/3417.audit-for-loops-mutable-dict-views-python-3

Audit for loops for mutable dict views bugs on Python 3

Fixes ticket:3417

Note: See TracTickets for help on using tickets.