Tag Archives: command pattern

Alternatives to Single Function Classes

In Stop Writing Classes, a talk every Python engineer should watch, Jack Diederich tells us to avoid classes that have a single method, such as:

Jack suggests, rightly, that you can just define and call a function like this:

Sometimes, however, your function needs to accept a specific set of arguments. For example,… Read More »