[docs] [issue37563] Documentation - default for StreamHandler

Vinay Sajip report at bugs.python.org
Sat Jul 13 06:10:51 EDT 2019


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> the prose clearly say that the default is sys.stderr, however the code doesn't show that

Which code are you looking at? Here is the entirety of StreamHandler.__init__:

    def __init__(self, stream=None):
        """
        Initialize the handler.
        If stream is not specified, sys.stderr is used.
        """
        Handler.__init__(self)
        if stream is None:
            stream = sys.stderr
        self.stream = stream

> We users Do. Not. Care. about how wonderfully clever your implementation is, we care about how it actually works. Whatever Rube-Goldbergian implementation details there are behind the scenes are of no interest to us.

I'm not sure your tone is particularly constructive here. I don't regard the code you say you've read, reproduced above, is particularly Rube-Goldbergian, or even Heath-Robinsonish. And are you presuming to speak for all Python users here?

> Fine, lets try this another way - does anyone else have opinions on this?

As far as I can remember, you're the first person to bring this up since logging was added to Python in 2003. In all that time, no-one appears to have been confused by that prose, which has been there since pretty much the beginning, though there was a spelling change and a logging documentation reorganisation around 9 years ago.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37563>
_______________________________________


More information about the docs mailing list