[Pulp-dev] Discouraging Usage of *args and **kwargs in Pulp3

Brian Bouterse bbouters at redhat.com
Wed Jun 21 16:41:26 UTC 2017


tl;dr:  Only use *args and **kwargs in a function signature if you can't be
sure what will be passed in.

In some committed code on 3.0-dev and in new Pulp3 PRs coming in, *args and
**kwargs are being used regularly when they don't have to be. I think it's
just a byproduct of that idiom being committed early and when others went
to make code that was similar the idiom was just kept.

The motivation to avoid this is to be explicit with our function signatures
not implicit. It also makes signatures significantly more readable since
all the args aren't hidden.

If you see one of these in a PR or already committed, please change it.
Please send thoughts, questions, or concerns about this recommendation.

Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20170621/346cec54/attachment.htm>


More information about the Pulp-dev mailing list