Errors should never pass silently ... unless explicitly silenced.

Mark McEahern marklists at mceahern.com
Fri Feb 7 11:04:43 EST 2003


[Skip Montanaro]
>     class NUL:
>         def write(self, *args):
>             pass
>
>     sys.stderr = NUL()

Wait, but don't you have to declare that the class NUL implements the
IGarbage and IStream interfaces?

<wink>

// m

-






More information about the Python-list mailing list