Is Python a functional programming language?

Paul Rubin no.email at nospam.invalid
Sun May 16 00:36:32 EDT 2010


travis+ml-python at subspacefield.org writes:
> To be fair, it appears that Python's whitespace-sensitive syntax sort
> of precludes the "make a complex function on one line" that is typical
> of languages which don't have statement/expression distinctions, but
> I'm not convinced it couldn't be solved, perhaps by allowing anonymous
> functions to span multiple lines, just like named functions.

Haskell has whitespace-based syntax like Python (you can alternatively
use curly braces).  Their term for it is "layout".  You can
alternatively use curly braces and semi-colons.  I'd have to say that
Haskell's indentation rules are a bit harder to understand than Python's
at first.



More information about the Python-list mailing list