Kevin Dangoor wrote: > To be clear: this is strictly for the "name" parameter. It's used on > every form input field, which is why I think it deserves somewhat > special treatment. >
In this case, sure, why not... +1 > Ideally, there wouldn't be **kw at all... but, realistically, the > subclasses need it, otherwise they can't take advantage of new base > class features easily. Widget no longer has **kw, so at least you'll > get an error if you pass in something invalid and it makes it all the > way up. > Hmmm, didn't think about that one.... and you're right. But what I mean is that, if posssible, list explicitly all the parameter we *do* know that our superclass' constructor needs as to aid people following the code (and ourselves ;) in knowing what's going on. If a new parameter is added at the superclass', no problem, **kw takes care of that (And we have time to update our code). If a former parameter is removed, our code breaks (with a "TypeError: test() got an unexpected keyword argument 'spam'", which, IMO, is good, as me might have depended on that functionality which was removed). Just let's try to be consistent, at least in favor of our own mental sanity ;) Alberto

