29 Oct
2012
29 Oct
'12
5:43 p.m.
On Mon, Oct 29, 2012 at 10:08 AM, Yury Selivanov <yselivanov.ml@gmail.com> wrote:
On 2012-10-29, at 1:03 PM, Guido van Rossum <guido@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)