Favorite non-python language trick?
Erik Max Francis
max at alcyone.com
Thu Jun 30 22:39:56 EDT 2005
ncf wrote:
> Eh, just figured it'd be worth noting...map, filter, and reduce should
> be possible with the extended list syntaxes. Well, filter I know is,
> but hte others /should/ be possible.
>
> filter(lambda: <<condition>>, <<seq>>)
> [some_var for some_var in <<seq>> if <<condition>>]
reduce isn't.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Who needs a dream / Who needs ambition
-- The Russian, _Chess_
More information about the Python-list
mailing list