On 2012-10-29, at 1:03 PM, Guido van Rossum email@example.com 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.