[Python-ideas] Cofunctions - an enhancement to yield-from
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Aug 2 08:06:01 CEST 2010
Antoine Pitrou wrote:
> Well, it sounds like saying classes and functions are closely related
> concepts because both denote callable objects.
I think it's more like saying that methods and functions
are related, and Python does implement methods in terms of
functions.
Similarly, cofunctions are a new concept, but they're
built out of lower-level pieces -- generators and yield-from
-- that are also available separately.
(That could be another Python catchphrase, btw:
"Batteries available separately." :-)
--
Greg
More information about the Python-ideas
mailing list