On 12/25/06, Michael Foord <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm trying to determine function signatures from IronPython.
>
> In Python I'd use 'inspect.getargspec'.
>
> In IronPython this raises a 'NotImplementedError'.

'inspect' is a pure-python module. Where's the NotImplementedError from?

Hm. A bit of poking around.

def foo(a,b,*c): pass

foo.func_code.co_code is unimplemented - inspect does some foul
disassembly of this for anonymous tuple arguments. I doubt that's ever
going to work, but otherwise it's OK. Except for the bugs.

In CPython:
>>> def foo(a,b,*c):
...     pass
...
>>> foo.func_code.co_argcount
2

While in IronPython...
>>> def foo(a,b,*c):
...     pass
...
>>> foo.func_code.co_argcount
3
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to