On Fri, Jan 24, 2014 at 2:37 PM, Tobias Oberstein
<[email protected]> wrote:
> I have noticed that `inspect.getargspec` won't return useful information on
> functions decorated with `@asyncio.coroutine`.
> (Sidenote: same with Twisted's `@inlineCallbacks`)

I presume you are talking about Trollius? It works for Tulip:

>>> @asyncio.coroutine
... def foo(x, y=42): yield from ()
...
>>> print(inspect.getargspec(foo))
ArgSpec(args=['x', 'y'], varargs=None, keywords=None, defaults=(42,))

> However, `inspect.signature` from
>
> http://www.python.org/dev/peps/pep-0362/
>
>  _does_ work (means: returns the actual function signature).
>
> Will this be made available on Python 2, or are there fundamental reasons
> this won't work out?

If it requires modifications to the inspect module it won't be
backported (new feature time is over). If it can be accomplished by
tweaking Trollius' @coroutine implementation, it might be done, if
someone who would know how to do this cares enough. Peresonally I
don't know and I don't care. :-(

-- 
--Guido van Rossum (python.org/~guido)

Reply via email to