pylint #6954 false "Using variable before assignment" on one-liner with-statements [resolved]

Mads Kiilerich

from __future__ import with_statement
with file('f') as f: print f.read()

gives

E:  2: Using variable 'f' before assignment

When the print statement is moved to its own line pylint correctly doesn't see an error

prioritynormal
typebug
done in0.16.0
load0.500
load left0.000
closed by<not specified>