[EMAIL PROTECTED] wrote: > Agreed. > > In conclusion use KWD if you have a large enough number of paramters > (such as 5), otherwise stick with params.
Hi wulabsdev, If I may throw in my $0.02... While named arguments are much cleaner in general, I have found that when handling form data, I am usually just passing it on to the ORM and so doing model.set(**kwargs) is cleaner. It also allows me, in the controller, to cherry pick the fields that need extra checking/changing/whatever, while ignoring the rest. (And I always use validators so I don't store unverified data.) This is cleaner than explicitly naming all your parameters that are passed to the ORM. fumanchu briefly mentioned this as well. I do use both styles. I use names arguments for simple forms or for expected parameters and use **kwargs for medium/large forms that I am dumping straight to the ORM. Anyway, I hope this helps. Thanks for letting me share. :-) Krys --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

