]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: use boolean constants for returning boolean value (GH-133325)
authorYongzi Li <1538321957@qq.com>
Fri, 9 May 2025 14:11:50 +0000 (22:11 +0800)
committerGitHub <noreply@github.com>
Fri, 9 May 2025 14:11:50 +0000 (17:11 +0300)
Doc/library/stdtypes.rst
Doc/library/string.rst

index 61d39a6671caed5c2ab949df16993f36d9476e6b..1d9a655c7664ea2b0c259bdc3ecf2dbdfccc5f1c 100644 (file)
@@ -2012,7 +2012,7 @@ expression support in the :mod:`re` module).
 
 .. method:: str.isprintable()
 
-   Return true if all characters in the string are printable, false if it
+   Return ``True`` if all characters in the string are printable, ``False`` if it
    contains at least one non-printable character.
 
    Here "printable" means the character is suitable for :func:`repr` to use in
index b44d98819b6998bd0b83e6755cd102ed9661b526..c4012483a52f730a63980a71ea370134b947db0c 100644 (file)
@@ -858,7 +858,7 @@ these rules.  The methods of :class:`Template` are:
 
    .. method:: is_valid()
 
-      Returns false if the template has invalid placeholders that will cause
+      Returns ``False`` if the template has invalid placeholders that will cause
       :meth:`substitute` to raise :exc:`ValueError`.
 
       .. versionadded:: 3.11