Sept. 17, 2010
2:40 p.m.
On 08/11/10 01:57, Guido van Rossum wrote:
- Would it be sufficient if codef was a decorator instead of a keyword? (This new keyword in particular chafes me, since we've been so successful at overloading 'def' for so many meanings -- functions, methods, class methods, static methods, properties...)
+1. I'd like to see this implemented as decorator (perhaps with special casing by the VM if necessary), and see how this cofunction will be used in wider practice before deciding whether the syntax sugar is necessary. The decorator could live as a built-in function or as stdlib module (from cofunction import cofunction), and be clearly marked as experimental.