]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127805: Clarify Formatter initialization in logging.rst. (GH-127850)
authorUV <yuvrajpradhan667@gmail.com>
Fri, 21 Feb 2025 07:10:04 +0000 (12:40 +0530)
committerGitHub <noreply@github.com>
Fri, 21 Feb 2025 07:10:04 +0000 (07:10 +0000)
Doc/library/logging.rst

index 34bb46f0bb1ecb126731782949cd4dc6d752d944..72190e972405140495c726cdcf78fca3a92244b6 100644 (file)
@@ -562,7 +562,8 @@ subclasses. However, the :meth:`!__init__` method in subclasses needs to call
 
    .. method:: Handler.setFormatter(fmt)
 
-      Sets the :class:`Formatter` for this handler to *fmt*.
+      Sets the formatter for this handler to *fmt*.
+      The *fmt* argument must be a :class:`Formatter` instance or ``None``.
 
 
    .. method:: Handler.addFilter(filter)