How to freeze some arguments over multiple related class methods
问题 What's the "best" method to take a collection of functions that use some common argument names (assumed to mean the same thing), and make an object that holds these functions, but with some key argument values fixed, or at least their defaults fixed. If I'm going to have a set of functions meant to work on some specific data defined by a set of attributes, I'd usually use a class, providing the attributes that must be set in the __init__ . But sometimes it makes more sense to start with