On 10/02/11 5:59 PM, Kenneth Gonsalves wrote:
> he wanted to drop lambda and I think reduce and map - but he was made to
> change his mind and reluctantly kept them.

True. The lambda expressions still exist on
Python 3000 as there are no other "pythonic"
alternatives to create anonymous functions.

It was impossible at this time to come up with
a better alternative to existing lambda expression
that could support multi-line statements - much
like Proc objects in Ruby for instance, without
breaking existing Python rules (indentation rules
for example).

The existing lambda expression as such does not
break any rules to be termed as unpythonic.

Even 'map' and 'filter' exists on Python 3000 as
most of the community believe them to be more
simpler and readable than list comprehensions
in many cases. Whether using them is pythonic or
not - can be subjective ;-). But they are redundant
variants of list comprehensions.

The 'reduce' was removed in Python 3000 (or rather
moved to functools, instead) to maintain consistency
overall.

Cheers,
Chandrashekar.

-- 
http://www.chandrashekar.info/
http://www.slashprog.com/



_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to