News for hackers. Stuff that matters.
Re:Toolz: A functional standard library for Python by dragonwriter on Thursday January 21, 2021 @06:21PM (#25866037)
> Can only use expressions, not statements. E.g. `print`s, loops, conditionals are out.

print is a function (and thus can be used in expressions)

python has conditional expressions (<true-val> if <cond> else <false-val>)

loops are a limitation, though comprehensions, map(), functools.reduce(), and the itertools module can allow lots of looping functionality in an expression.

There are no comments on this comment yet.