bpo-38738: Fix formatting of True and False. (GH-17083)

* "Return true/false" is replaced with "Return ``True``/``False``"
  if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
This commit is contained in:
Serhiy Storchaka 2019-11-12 16:57:03 +02:00 committed by GitHub
parent 9a13a388f2
commit 138ccbb022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 176 additions and 176 deletions

View file

@ -181,8 +181,8 @@ are always available. They are listed here in alphabetical order.
.. function:: callable(object)
Return :const:`True` if the *object* argument appears callable,
:const:`False` if not. If this returns true, it is still possible that a
call fails, but if it is false, calling *object* will never succeed.
:const:`False` if not. If this returns ``True``, it is still possible that a
call fails, but if it is ``False``, calling *object* will never succeed.
Note that classes are callable (calling a class returns a new instance);
instances are callable if their class has a :meth:`__call__` method.
@ -840,19 +840,19 @@ are always available. They are listed here in alphabetical order.
.. function:: isinstance(object, classinfo)
Return true if the *object* argument is an instance of the *classinfo*
Return ``True`` if the *object* argument is an instance of the *classinfo*
argument, or of a (direct, indirect or :term:`virtual <abstract base
class>`) subclass thereof. If *object* is not
an object of the given type, the function always returns false.
an object of the given type, the function always returns ``False``.
If *classinfo* is a tuple of type objects (or recursively, other such
tuples), return true if *object* is an instance of any of the types.
tuples), return ``True`` if *object* is an instance of any of the types.
If *classinfo* is not a type or tuple of types and such tuples,
a :exc:`TypeError` exception is raised.
.. function:: issubclass(class, classinfo)
Return true if *class* is a subclass (direct, indirect or :term:`virtual
Return ``True`` if *class* is a subclass (direct, indirect or :term:`virtual
<abstract base class>`) of *classinfo*. A
class is considered a subclass of itself. *classinfo* may be a tuple of class
objects, in which case every entry in *classinfo* will be checked. In any other