Variables on LHS of in-place slice operations are ignored
Bug #1108904 reported by
bistromathic
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
High
|
Unassigned |
Bug Description
Pyflakes complains that 'a' is unused, and doesn't spot that 'b' and 'c' are undefined, in the following code:
def f(seq):
a = 0
seq[a] += 1
seq[b] /= 2
c[0] *= 2
It seems to work correctly with assignments to slices, and in-place operations that don't involve slices.
Related branches
lp:~pyflakes-dev/pyflakes/1108904-augmented-assignment
- Pyflakes Dev: Pending requested
-
Diff: 41 lines (+19/-1)2 files modifiedpyflakes/checker.py (+1/-1)
pyflakes/test/test_undefined_names.py (+18/-0)
Changed in pyflakes: | |
milestone: | none → 0.6.1 |
To post a comment you must log in.
This is confirmed as a regression of pyflakes 0.6.