Most Pythonic would be what the Python standard library already does. Core developer Raymond Hettinger (the collections
guy) gave a talk on this, plus general guidelines for how to write classes.
Use separate, class-level functions to initialize instances, like how dict.fromkeys()
isn't the class initializer but still returns an instance of dict
. This allows you to be flexible toward the arguments you need without changing method signatures as requirements change.