A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021637.html below:

[Python-Dev] Re: PEP 282 comments

[Python-Dev] Re: PEP 282 comments [Python-Dev] Re: PEP 282 commentsKevin Butler kbutler@campuspipeline.com
Fri, 22 Mar 2002 11:22:55 -0700
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