[Yum-devel] [PATCH 2/6] getPackage, _getFile: kwargs pass-through

Zdenek Pavlas zpavlas at redhat.com
Thu Feb 2 11:42:12 UTC 2012


> > -            cache=True, size=None):
> > +            cache=True, size=None, **kwargs):
> 
>  Why are you doing this instead of adding failfunc and async? I can
>  kind of see the idea behind doing it for the RHN plugin override, but
>  we'll always know what is being passed in internally.

I could argue that **kwargs gives more flexibility
so we can add/remove/rename arguments at the endpoints
without changing signatures of the "glue" functions..
..but we'll probably never need that, so.. it's just
less typing.

The only downside I see is that it's less descriptive,
you have to grep callers to see what's in **kwargs.

But overall, I still prefer this- because:
* _getFile() has way too many argments already.
* failfunc/async args are dealt with at one place only.


More information about the Yum-devel mailing list