Variables on LHS of in-place slice operations are ignored

Bug #1108904 reported by bistromathic
10
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

Revision history for this message
Florent (florent.x) wrote :

This is confirmed as a regression of pyflakes 0.6.

Changed in pyflakes:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Florent (florent.x) wrote :

Thank you, fixed in 0.6.1.

Changed in pyflakes:
status: Confirmed → Fix Released
Florent (florent.x)
Changed in pyflakes:
milestone: none → 0.6.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.