filter, map (reduce, any, all) come from the world of Functional
Programming. For that matter list comprehension was borrowed from FP
(haskell).

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.

jeff

PS: If it interests you, read about MapReduce that Google use to come up
with lightening fast search results. yes. mapreduce = map + reduce. simple,
effective, elegant.

On Tue, Feb 9, 2010 at 10:52 AM, Srinivas Reddy Thatiparthy <
srinivas_thatipar...@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
> Listcomprehensions..
> Is there any situation in which they fare better than list
> comprehensions?
>
> Regards,
> ~ Srini T
> _______________________________________________
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to