3 ms·
I'm no expert, but I've found it's best to use kwargs near the middle of a class hierarchy. This makes it much simpler to build the internal API - the classes
by ngoldbaum 13y ago
I'm no expert, but I've found it's best to use kwargs near the middle of a class hierarchy. This makes it much simpler to build the internal API - the classes near the top of the hierarchy have specific kwargs, but their subclasses don't need to explicitly enumerate them. One can then write user-facing subclasses at the bottom of the hierarchy that have explicit arguments and keywords arguments.