functional programming with map()

mcherm mcherm at destiny.com
Tue Feb 26 13:23:34 EST 2002


>> List comprehensions are declarative (no loops) and they avoid side effects
>> (no loop variables or temporaries)
> 
> No side effects?  Try this:
> 
> L = [x for x in range(10)]
> print x
> 

Yeah, but that's a bug.

<pulls hat down over head and ducks behind the desk>

-- Michael Chermside







More information about the Python-list mailing list