[Python-ideas] Async API: some code to review
Guido van Rossum
guido at python.org
Mon Oct 29 18:43:09 CET 2012
On Mon, Oct 29, 2012 at 10:08 AM, Yury Selivanov
<yselivanov.ml at gmail.com> wrote:
> On 2012-10-29, at 1:03 PM, Guido van Rossum <guido at python.org> wrote:
>
>> Agreed it would be useful as documentation, and maybe an API can use
>> this to enforce proper coding style. It would have to be purely
>> decoration though -- I don't want an extra layer of wrapping to occur
>> each time you call a coroutine. (I.e. the decorator should just return
>> "func".)
>
> I'd also set something like 'func.__coroutine__' to True. That will allow
> to analyze, introspect, validate and do other useful things.
Yes, that sounds about right.
--
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas
mailing list