Following up on my own message: [Kevin Butler] > the "simple subclass" now just needs to override _log to do > advanced things with other optional arguments. I realized that this is a significant issue. In library design, the "Open-Closed" principle is really important - the code should be open to extension, but is closed to modification. By adding the **kwargs to the convenience methods, the Logger opens itself to change and enables all subclasses to extend the interface by overriding _log with more keyword arguments. Without **kwargs, subclasses have to override _log and every one of the convenience methods (1.5K of duplicated code). Setting-myself-up-for-YAGNI-ly y'rs, kb
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4