[ovs-dev] [python idl 02/16] python: Avoid "unused parameter" warnings from pychecker.

Ben Pfaff blp at nicira.com
Tue Sep 20 18:06:47 UTC 2011


On Mon, Sep 19, 2011 at 03:11:32PM -0700, Ethan Jackson wrote:
> > - ? ?def __parse_end(self, token, string):
> > + ? ?def __parse_end(self, _, dummy):
> 
> According to the style guide you can prepend a variable with
> "unused_".  In my experimentation pychecker respects that.  For this
> reason I think this would be clearer as:
> 
> def __parse_end(self, _, unused_string):
> 
> or even better:
> 
> def __parse_end(self, unused_token, unused_string)
> 
> Do either of the above prototypes pychecker for you?

I missed that "unused_" worked too.  Thanks, that's much better.  I
updated the patch.



More information about the dev mailing list