[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Pass createUser and createGroup an arguments dict.



On Fri, Mar 04, 2011 at 11:40:42AM -0500, Chris Lumens wrote:
> This makes the calls to these two functions a whole lot cleaner - instead
> of passing an enormous list of arguments, I can just convert the pykickstart
> objects into a dict and pass those in as the kwargs.
> 
> This sets up for passing more arguments in the future (for stuff like password
> controls) without having to make the method calls even larger.
> ---
>  anaconda            |    6 ++--
>  pyanaconda/users.py |   71 +++++++++++++++++++++++----------------------------
>  2 files changed, 35 insertions(+), 42 deletions(-)

This makes the call cleaner, but at the same time makes it harder for
callers to know what they can and need to pass. I think a docstring with
supported arguments would be helpful.
-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgp31ZiyvLENt.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]