[BangPypers] which one is the best pythonic way .
jeffjosejeff at gmail.com
Tue Feb 9 06:45:07 CET 2010
filter, map (reduce, any, all) come from the world of Functional
Programming. For that matter list comprehension was borrowed from FP
I wont attempt to compare them as they cater to different needs. Yes, they
overlap in certain areas but I'd like to think of them as seperate assets
suited for different needs.
For simple stuff, List Comprehension offers superior readability but it can
get too much too fast if you start chaining a lot.
Do not overlook the power of filter, map as they _are_ valuable tools in
your everyday programming.
PS: If it interests you, read about MapReduce that Google use to come up
with lightening fast search results. yes. mapreduce = map + reduce. simple,
On Tue, Feb 9, 2010 at 10:52 AM, Srinivas Reddy Thatiparthy <
srinivas_thatiparthy at akebonosoft.com> wrote:
> Thanks for the replies and I avoid using lambdas..
> Btw,Shall I avoid using filter and map ?
> Because what ever filter and map do,I could seem to do the same with
> Is there any situation in which they fare better than list
> ~ Srini T
> BangPypers mailing list
> BangPypers at python.org
More information about the BangPypers