pylint -- should I just ignore it sometimes?

Shawn Milochik shawn at
Tue Oct 19 23:34:40 CEST 2010

Just to be pedantic (or maybe even helpful), the use of the comma
after the exception is deprecated in favor of 'as.'


except ValueError as ex:


except ValueError, ex:

I don't know how far back in Python versions this syntax reaches, but
if yours supports it then it's probably a good idea to get into the
This way, you can catch multiple exceptions in a tuple without
confusing the interpreter:

except ValueError, IndexError as ex:


More information about the Python-list mailing list