Simple pychecker question

Neal Norwitz neal at metaslash.com
Sat Jun 8 20:07:54 EDT 2002


On Fri, 07 Jun 2002 16:44:50 -0400, Michael Gilfix wrote:

>   Pychecker doesn't seem to like named arguments (such as def
> f(f='blah'), or sometimes, it's handy in __init__).  Why is that? Are
> they considered bad style in some respects?  How about use in __init__
> functions?

Are you saying that there is a warning message?
Or that the code breaks pychecker?

In older versions, the default for this warning was turned on.
It is off in more recent versions.

I personally think that superfluous use of named args are bad,
but that the feature is good when used properly.  For example,
with your code above, calling f(f=2) would be better written
f(2).  However for Tkinter, named args can be useful when there
are a bunch of parameters and you only want to use the last.

Neal



More information about the Python-list mailing list