On Fri, Aug 05, 2005 at 05:17:05PM +0100, Mark Williamson wrote:
> > #3 has the nice side-effect of ensuring that xmlib is completely
> > documented which makes xmlib the perfect python interface for management
> > tools. It would be even nicer if the arguments were expanded instead of
> > passed as a list so the functions could be called in a more natural way.
>
> Just remembered what else I was going to say earlier:
>
> If you do: function_name(*arg_list) it'll expand the list into separate args,
> so you can do exactly that.
>
> (side note: a "**" will cause a dictionary to be expanded into a list of
> multiple named arguments)
>
> See, Python Is Your Friend :-)
Yes, I 100% agree that expanding the args before passing on would be a good
thing. It just requires a lot of other changes, so I decided it would be
best to try to attack things 1 file at a time, instead of changes all over
the place to start. :)
Ideally the first time the args are expanded the functions would be when
they were sanity checked as well (i.e. does this domain exist, are these
values in range, etc, etc) so that args passed to the next level have a
reasonable chance of been semi-valid, not just random, and proper error
conditions can be returned.
-Sean
--
__________________________________________________________________
Sean Dague Mid-Hudson Valley
sean at dague dot net Linux Users Group
http://dague.net http://mhvlug.org
There is no silver bullet. Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________
pgpQvkT649rni.pgp
Description: PGP signature
_______________________________________________
Xen-tools mailing list
Xen-tools@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-tools
|