Docs: use boolean constants for returning boolean value (GH-133325)

This commit is contained in:
Yongzi Li 2025-05-09 22:11:50 +08:00 committed by GitHub
parent 2a630a35cf
commit 076004ae54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View 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

View 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