pylint does not recognize potential undefined variables

Created on 28 Sep 2013  路  2Comments  路  Source: PyCQA/pylint

Originally reported by: Mirko Dziadzka (BitBucket: mirkodziadzka, GitHub: @mirkodziadzka?)


The following code should generate a warning, that the variable res may be undefined in the finally clause

#!python
try:
    # throw exception here to make res undefined
    res = 42
finally:
    print res

enhancement false negative topic-control-flow

Most helpful comment

this has been open 6 years. Is it on the roadmap?

thanks

All 2 comments

_Original comment by_ Sylvain Th茅nault (BitBucket: sthenault, GitHub: @sthenault?):


see also issue #12

this has been open 6 years. Is it on the roadmap?

thanks

Was this page helpful?
0 / 5 - 0 ratings