-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Milestone
Description
Originally reported by: Tom Dryer (BitBucket: tdryer, GitHub: @tdryer?)
In the following code, pylint fails to identify that the e in the except clause is an unused variable, and that the e in print(e) is an undefined variable:
#!python
def main():
try:
raise ValueError
except ValueError as e:
pass
print(e)
main()
The issue appears to be that pylint doesn't understand that the scope of the exception variable is limited to the except clause.