[Python-ideas] Cofunctions: It's alive! Its alive!
lie.1296 at gmail.com
Fri Sep 17 16:40:48 CEST 2010
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.
More information about the Python-ideas