[Python-ideas] Async API: some code to review

Yury Selivanov yselivanov.ml at gmail.com
Mon Oct 29 18:08:14 CET 2012


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.

-
Yury



More information about the Python-ideas mailing list