functional programming with map()
Raymond Hettinger
python at rcn.com
Mon Mar 4 00:48:06 EST 2002
"mcherm" <mcherm at destiny.com> wrote in message
news:mailman.1014747703.26001.python-list at python.org...
> >> 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.
It COULD be a feature
despite its creepy-crawly,
six-legged, hive-dwelling,
crumb-eating nature.
Hard to tell.
Raymond Hettinger
@ @
\_/
More information about the Python-list
mailing list