> I do not understand why you want to do this.  Why not just pass request.POST
> without the **, and declare your function to take a single argument which
> you expect to be a dictionary-like object (as request.POST, a QueryDict,
> is)?.  That is:
>
> result = ab.perform(request.POST)
> where:
> def perform(self, datadict):
>
> What could you do with 'kwargs' in your syntax that you cannot do with
> 'datadict' in this alternative?

What if he wanted to do something like:

   ab.perform(name='x', y=12) or whatever, but also have the option to use
   ab.perform(**a_dict) or
   ab.perform(a_dict)

Can you do something like:

def perform(self, datadict=None, **kwargs):
  if datadict is None:
      datadict = kwargs
  elif kwargs is not None:
      datadict.update(kwargs)

I'm not sure that this would work; just kind of thinking out loud.

-Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to