From: Vinay Sajip Date: Sat, 26 Sep 2009 14:53:32 +0000 (+0000) Subject: Tidied up name of parameter in StreamHandler X-Git-Tag: v2.7a1~458 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4780c9a0e0634ae0b5f5f508a9a8e4b8fac83a2c;p=python Tidied up name of parameter in StreamHandler --- diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 07833bb83a..ef2f34af95 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -1681,9 +1681,9 @@ file-like object (or, more precisely, any object which supports :meth:`write` and :meth:`flush` methods). -.. class:: StreamHandler([strm]) +.. class:: StreamHandler([stream]) - Returns a new instance of the :class:`StreamHandler` class. If *strm* is + Returns a new instance of the :class:`StreamHandler` class. If *stream* is specified, the instance will use it for logging output; otherwise, *sys.stderr* will be used. diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 9e18c22705..9c72542c2b 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -745,16 +745,16 @@ class StreamHandler(Handler): sys.stdout or sys.stderr may be used. """ - def __init__(self, strm=None): + def __init__(self, stream=None): """ Initialize the handler. - If strm is not specified, sys.stderr is used. + If stream is not specified, sys.stderr is used. """ Handler.__init__(self) - if strm is None: - strm = sys.stderr - self.stream = strm + if stream is None: + stream = sys.stderr + self.stream = stream def flush(self): """