On Mon, Jan 24, 2011 at 7:17 AM, Jean-Michel Pichavant < [email protected]> wrote:
> James Lingard wrote: > >> I would like the ability to disable the W0612 warning for variables >> created as the result of a sequence unpacking operation. For example, >> after: >> >> ( a, b, c, d, e ) = mytuple >> >> pylint will currently complain about all the unused variables. Although I >> could rename the unused variables to something like _b to indicate they're >> supposed to be unused, I'd rather just ignore all W0612 warnings in this >> case. >> >> Is this feature available in the latest version of pylint? Has anyone >> else requested this feature? If not, then I may work on implementing it. >> >> Thanks, >> James. >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Python-Projects mailing list >> [email protected] >> http://lists.logilab.org/mailman/listinfo/python-projects >> > Actually, people do things slightly diferently: > > a, _, c, _, _ = mytuple > What I usually do: foo, bar, baz, blee, blah = mytuple dummy = bar dummy = blee dummy = blah ...that way I still get a sort of description of what the variables are, but no warnings, and no warnings turned off that might cause something unrelated to go uncaught. -- Dan Stromberg
_______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
