] > [Python-projects] Disabling a message once (Logilab.org)

Email [Python-projects] Disabling a message once

from
Benjamin Niemann <pink at odahoda dot de>
subject
[Python-projects] Disabling a message once
date
2005/06/26 21:35
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/
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects


has reply