Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Only one or two years ago, I remember reading Python constructs that would be removed from Python -- reduce was one of them -- and other constructs that would be emphasized like comprehensions and generators. I saw a very nice description of how Python could be made more functional here, and I was wondering on which list lambda appeared, supported or soon-not-to-be supported.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

lambda is not deprecated, and will continue to be part of the language. Attempts have been made to find an alternative, but nothing fruitful ever came from that.

Quoting a post by Guido van Rossum in 2006:

After so many attempts to come up with an alternative for lambda, perhaps we should admit defeat. I've not had the time to follow the most recent rounds, but I propose that we keep lambda, so as to stop wasting everybody's talent and time on an impossible quest.

reduce() was moved to the functools module, so out of the built-in namespace, because its use in Python has always remained obscure. map() is still there though, as it was shown to be very useful still.

share|improve this answer
    
Thanks for the answer and finding the quote. –  octopusgrabbus Aug 3 '14 at 22:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.