[Python-projects] Disabling a message once
Benjamin Niemann
pink at odahoda.de
Sun Jun 26 21:35:07 CEST 2005
Hi,
I think it would be nice, if I could disable a message only once for a
specific occurance - instead of disabling it module-wide. E.g.
<code>
try:
...
except KeyError:
# I'll implement error handling later
pass
try:
...
except KeyError:
# If key is not in dict, no action required
pass
</code>
I would like to disable the message in the second case, but not in the first
one.
How about something like
# pylint: disable-msg-once=W0704
shortly before the line where the issue is detected.
What are your thoughts about this?
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
More information about the Python-Projects
mailing list