11 The Toolz Package
The toolz
package, offered by the pytoolz project on GitHub, contains a number of functional programming features. Specifically, these libraries offer iteration tools, higher-order function tools, and even some components to work with stateful dictionaries in an otherwise stateless function application.
There is some overlap between the toolz
package and components of the standard library. The toolz
project decomposes into three significant parts: itertoolz
, functoolz
, and dicttoolz
. The itertoolz
and functoolz
modules are designed to mirror the standard library modules itertools
and functools
.
We’ll look at the following list of topics in this chapter:
We’ll start with star-mapping, where a
f(*args)
is used to provide ...
Get Functional Python Programming - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.