On Oct 14, 4:16 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 14, 5:00 pm, "Aaron \"Castironpi\" Brady" > > > > <[EMAIL PROTECTED]> wrote: (snip > > Here's some more info. > > > Ver 2.5: > > > >>> f( c= 0, c= 0 ) > > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > TypeError: f() got multiple values for keyword argument 'c'>>> getcallargs( > > f, c= 0, c= 0 ) > > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "<stdin>", line 64, in getcallargs > > TypeError: f() takes at least 2 non-keyword arguments (0 given) > > > Just the wrong order to check errors in. > > The problem is getcallargs doesn't even see the double entry; if you > print (args, kwds) from within getcallargs you get ((), {'c': 0}). The > SyntaxError raised in 2.6 is more reasonable. > > George
There are some other bugs in inspect that put getcallargs on par with the module as is, even without repairing it. And it covers a majority of cases. Perhaps a lower-level C version could circumvent that, or have access to the right information. -- http://mail.python.org/mailman/listinfo/python-list