Redirecting warnings.showwarning to logging

Nick Coghlan ncoghlan at
Sun Nov 23 22:26:10 CET 2008

Tres Seaver wrote:
> Nick Coghlan wrote:
>> Antoine Pitrou wrote:
>>> Brett Cannon <brett <at>> writes:
>>>> It is specifically there to be overridden (and as an aside, it was a
>>>> pain to support in the C port of warnings), so it really isn't
>>>> monkey-patching. =)
>>> Should we coin a new word for this? Pretty-patching?
>> When the module docs tell you it's OK, it's just overriding the
>> function. If the docs don't tell you to do it, it's monkey patching :)
> Monkey-patching is never inheritance-based:  it means replacing a method
> / attribute of a module or class from a different module, after import time.

Hence why I said overriding a function, not a method. Class hierarchies
don't have a monopoly on that word.


Nick Coghlan   |   ncoghlan at   |   Brisbane, Australia

More information about the Python-list mailing list