The Python Papers

The Python Papers

Python 201 - Using functools to make Partial Functions

Mike Driscoll's avatar
Mike Driscoll
Mar 11, 2025
∙ Paid

Python comes with a fun module called functools. One of its classes is the partial class. You can use it create a new function with partial application of the arguments and keywords that you pass to it. You can use partial to “freeze” a portion of your function’s arguments and/or keywords which results in a new object.

Another way to put it is that part…

User's avatar

Continue reading this post for free, courtesy of Mike Driscoll.

Or purchase a paid subscription.
© 2025 Mike Driscoll · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture