[Python-Dev] code blocks using 'for' loops and generators

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 14 01:14:21 CET 2005


Brian Sabbey wrote:
> The problem with creating a new mechanism is that sometimes you will 
> want to loop.  For example, reading a bunch of items from a shared 
> resource, modifying them, and sending them back.  A new, non-looping 
> mechanism will not be adequate for this because it cannot loop,

If there is a mechanism for passing a code block as
a thunk to an arbitrary function, the function is
free to loop or not as it sees fit. I'd just prefer
the spelling of it didn't force you to make it
look like it's looping when it's not.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-Dev mailing list