On 17 fév, 20:33, SamDonaldson <[EMAIL PROTECTED]> wrote:
> Hello,
>
> My pylons actions are setup such that a decorator passes in the *args,
> **kw request params coming from the user.  The problem is when
> spurious args are passed in.  I get an AttributeError exception since
> the signature of these actions don't take some of those arguments.

An AttributeError ??? That should be a TypeError.

> How do I make is so that I can take care of this case without having
> to pass **kw to every action signature sort of like a catch-all.  Is
> there a way to get details on the python function about to get called
> and to modify the arguments to only pass those that correspond to the
> signature?

import inspect
inspect.getargspec(somefunction)

I once wrote some code doing this, but I don't know if there's still a
copy somewhere. Anyway, that's rather trivial (and somewhat
boring...).


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

Reply via email to