On Thu, Feb 12, 2015 at 6:30 PM, Ludovic Gasc <[email protected]> wrote:
> I'm not a sphinx expert, but if somebody is working on a solution, isn't
> could more generic to handle any Python decorator, instead of coroutines
> only ?

Good idea. But are *all* asyncio coroutines are decorated as such?

The asyncio code often uses the inspect module to determine the kind
of function, right?

Best,

Luciano


>
> --
> Ludovic Gasc
>
> On Thu, Feb 12, 2015 at 6:24 PM, Luciano Ramalho <[email protected]>
> wrote:
>>
>> On Thu, Feb 12, 2015 at 2:35 PM, Ben Darnell <[email protected]> wrote:
>> > But then the coroutine object has a return type as well, which needs to
>> > be
>> > represented somehow. I think it's better to let the "return type"
>> > portion of
>> > the docs represent the eventual return value of the coroutine. The
>> > coroutine
>> > aspect of the function is most analogous to staticmethods and
>> > classmethods,
>> > which are given a special prefix in the docs:
>> >
>> > https://docs.python.org/3/library/stdtypes.html?highlight=fromkeys#dict.fromkeys
>> >
>> > Unfortunately it looks like these are built into sphinx so it's not as
>> > easy
>> > to add a new one (unless I'm missing something), but this seems like a
>> > good
>> > addition for the next version of sphinx.
>>
>> You are right, Ben, the best solution seems to be a sphinx extension
>> to generate markup like those classmethod tags.
>>
>> Cheers,
>>
>> Luciano
>>
>> --
>> Luciano Ramalho
>> Twitter: @ramalhoorg
>>
>> Professor em: http://python.pro.br
>> Twitter: @pythonprobr
>
>



-- 
Luciano Ramalho
Twitter: @ramalhoorg

Professor em: http://python.pro.br
Twitter: @pythonprobr

Reply via email to