Python's 'functools.partial' flattens nestings Automatically
Redowan Delowar
November 8, 2021
The constructor for functools.partial() detects nesting and automatically flattens itself
to a more efficient form. For example:
This returns:
Further reading
- [Tweet by Raymond Hettinger]
[tweet by raymond hettinger]:
https://twitter.com/raymondh/status/1454865294120325124
Discussion in the ATmosphere