Guido's regrets: filter and map

Simon Burton simonb at webone.com.au
Sat Nov 23 20:35:23 EST 2002


Hello,

I just read Guido's "python regret's" slide's from OSCON,
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=OSCON+%22python+regrets%22
and one thing i can't work out is,
he is saying we can do map() and filter() with
list comprehensions (it's faster too)
eg.

amapedlist = [ somefunc(x) for x in alist ]

But how would we do a filter with list comprehensions?


Simon Burton





More information about the Python-list mailing list