Re: Function argument conformity check

2008-06-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hi. I am looking for a way to check if some given set of (*args, **kwds) conforms to the argument specification of a given function, without calling that function. import inspect help(inspect.getargspec) -- http://mail.python.org/mailman/listinfo/python-list

Re: Function argument conformity check

2008-06-18 Thread crazychimp132
On Jun 18, 5:05 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 18, 3:41 pm, [EMAIL PROTECTED] wrote: > > > > > On Jun 18, 3:13 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit : > > > > > Hi. I am looking

Re: Function argument conformity check

2008-06-18 Thread George Sakkis
On Jun 18, 3:41 pm, [EMAIL PROTECTED] wrote: > On Jun 18, 3:13 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit : > > > > Hi. I am looking for a way to check if some given set of (*args, > > > **kwds) conforms t

Re: Function argument conformity check

2008-06-18 Thread Matthew Woodcraft
In article <[EMAIL PROTECTED]>, > The problem is that using these attributes, I would essentially have > to re-write the logic python uses when calling a function with a > given set of arguments. I was hoping there is a way to get at that > logic without rewriting it. I don't think there is. I end

Re: Function argument conformity check

2008-06-18 Thread dlists . cad
On Jun 18, 3:13 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Hi, > > Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit : > > > Hi. I am looking for a way to check if some given set of (*args, > > **kwds) conforms to the argument specification of a given function, > > without

Re: Function argument conformity check

2008-06-18 Thread Cédric Lucantis
Hi, Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit : > Hi. I am looking for a way to check if some given set of (*args, > **kwds) conforms to the argument specification of a given function, > without calling that function. > > For example, given the function foo: > def foo(a