[Edu-sig] re: Python Programming: An Introduction to ComputerScience

Dethe Elza dethe.elza at blastradius.com
Mon Dec 15 13:40:06 EST 2003


Quoth Kirby:

> Likewise, generators and list comprehensions (which we might not get 
> to in
> CS1), are productivity enhancers (there's also a PEP about combining 
> these
> two in particular, which Martelli is pushing -- dunno what's it's 
> status as
> of today).

Generator expressions have generated (pardon the pun) a lot of interest 
and support and will be part of Python 2.4 with a syntax very similar 
to list comprehensions, but with parentheses instead of square brackets 
(and the parens are optional in some cases).  Between this and the new 
itertools module (in the standard library) lazy evaluation becomes very 
accessible in Python (with all the benefits it brings for memory use 
and speed).

--Dethe

"All spiritual paths have four steps: show up, pay attention, tell the
truth, and don't be attached to the results."  Angeles Arien




More information about the Edu-sig mailing list