Klaus Foerster wrote:
Thanks a lot Emile,

Emile Anclin wrote:
On Wednesday 21 July 2010 17:44:55 [email protected] wrote:
Especially as pylint already supports disabling of warnings for only one line (if the line is short enough to append a trailing pylint directive)

The reason I want to use the disable statement is for example for
something like this:

timestamp,name,fsize,permission = get_next_entry()
dosomething_with(timestamp,name,permission)

I know, that fsize is not used, but considering the alternative this is most comprehensible and everything else renders IMHO the code less readable
If it is only about not using "fsize", you can call it _fsize, and it will be considered as a dummy variable (everything starting with "_" or with "dummy"; this dummy variable regex can be configured...).

Yes this is true.

for most of my warnings this should work out well.

I still think it would be a good idea to be able to disable warnings for
a multi line statement, which was split with '\' .

For the most common cases in my source code though,
your solution is even better than explicit disabling.



bye

Klaus
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects
I've seen people writting

timestamp, name, _, permission = get_next_entry()


The drawback is that your reader loose the information that you're expecting fsize as 3rd element. It may be worth it though. You just have to make sure that '_' is identified as a dummy variable in your pylint rules.

JM
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to