Talk:Python (programming language): Difference between revisions

Content deleted Content added
m Automated conversion
Fredb (talk | contribs)
*Yes, there are some functional programming features in Python
Line 1:
I don't believe Python supports [[:Functional programming|Functional programming]], as in [[:Prolog|Prolog]] or somesuch. It supports function-based programming... meaning that your program is just composed of functions nornot organized into classes and objects. I have gotten the two confused in the past, and I suspect that this is what happened here.
 
Or does Python really support fuctionalfunctional programming? Is there some add-on package that allows this? I wasn't aware of one. -- [[talk:Ansible|ansible]]
 
Yes, Python really does have some built-in functional programming features such as "map()", "filter()", "reduce()" and a somewhat limited "lambda", although I've read that Guido van Rossum now regrets including these features in the language. As a more readable and "Pythonic" alternative, "list comprehensions" were more recently introduced into the language and can often be used instead of the older functional programming constructs.