3 ms·
Serious question: what function features do you think Python's missing, that C# has (other than the lambda point)? Python indeed supports some functional parad
by jeffmk 11y ago
Serious question: what function features do you think Python's missing, that C# has (other than the lambda point)?
Python indeed supports some functional paradigms:
- functions are first-class citizens
- list and dict comprehensions, generators
- map, filter, reduce, etc. for data pipelining (though these specific idioms are/were contentious [1])
- lambda for anonymous functions, though it indeed has limitations compared to other languages
- other useful functionality in stdlib such as the functools, itertools, and operators modules
- some built in immutable data types, such as str (strings), bytes (byte-strings), tuples, frozensets
You can read more here:
https://docs.python.org/3/howto/functional.html https://docs.python.org/3/howto/functional.html
[1] http://www.artima.com/weblogs/viewpost.jsp?thread=98196 http://www.artima.com/weblogs/viewpost.jsp?thread=98196