Commit 13d1bfff authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #19795: Mark up True and False as literal text instead of bold.

parent a6a60b7d
...@@ -464,7 +464,7 @@ ancestor loggers. Because of this, it is unnecessary to define and configure ...@@ -464,7 +464,7 @@ ancestor loggers. Because of this, it is unnecessary to define and configure
handlers for all the loggers an application uses. It is sufficient to handlers for all the loggers an application uses. It is sufficient to
configure handlers for a top-level logger and create child loggers as needed. configure handlers for a top-level logger and create child loggers as needed.
(You can, however, turn off propagation by setting the *propagate* (You can, however, turn off propagation by setting the *propagate*
attribute of a logger to *False*.) attribute of a logger to ``False``.)
.. _handler-basic: .. _handler-basic:
...@@ -747,10 +747,10 @@ circumstances is dependent on the Python version. ...@@ -747,10 +747,10 @@ circumstances is dependent on the Python version.
For versions of Python prior to 3.2, the behaviour is as follows: For versions of Python prior to 3.2, the behaviour is as follows:
* If *logging.raiseExceptions* is *False* (production mode), the event is * If *logging.raiseExceptions* is ``False`` (production mode), the event is
silently dropped. silently dropped.
* If *logging.raiseExceptions* is *True* (development mode), a message * If *logging.raiseExceptions* is ``True`` (development mode), a message
'No handlers could be found for logger X.Y.Z' is printed once. 'No handlers could be found for logger X.Y.Z' is printed once.
In Python 3.2 and later, the behaviour is as follows: In Python 3.2 and later, the behaviour is as follows:
......
...@@ -296,7 +296,7 @@ is the module's name in the Python package namespace. ...@@ -296,7 +296,7 @@ is the module's name in the Python package namespace.
Finds the caller's source filename and line number. Returns the filename, line Finds the caller's source filename and line number. Returns the filename, line
number, function name and stack information as a 4-element tuple. The stack number, function name and stack information as a 4-element tuple. The stack
information is returned as ``None`` unless *stack_info* is *True*. information is returned as ``None`` unless *stack_info* is ``True``.
.. method:: Logger.handle(record) .. method:: Logger.handle(record)
......
...@@ -31,7 +31,7 @@ lots of shared sub-objects. The keys are ordinary strings. ...@@ -31,7 +31,7 @@ lots of shared sub-objects. The keys are ordinary strings.
Because of Python semantics, a shelf cannot know when a mutable Because of Python semantics, a shelf cannot know when a mutable
persistent-dictionary entry is modified. By default modified objects are persistent-dictionary entry is modified. By default modified objects are
written *only* when assigned to the shelf (see :ref:`shelve-example`). If the written *only* when assigned to the shelf (see :ref:`shelve-example`). If the
optional *writeback* parameter is set to *True*, all entries accessed are also optional *writeback* parameter is set to ``True``, all entries accessed are also
cached in memory, and written back on :meth:`~Shelf.sync` and cached in memory, and written back on :meth:`~Shelf.sync` and
:meth:`~Shelf.close`; this can make it handier to mutate mutable entries in :meth:`~Shelf.close`; this can make it handier to mutate mutable entries in
the persistent dictionary, but, if many entries are accessed, it can consume the persistent dictionary, but, if many entries are accessed, it can consume
......
...@@ -347,8 +347,8 @@ functions. ...@@ -347,8 +347,8 @@ functions.
manner described in :ref:`converting-argument-sequence`. This is because manner described in :ref:`converting-argument-sequence`. This is because
the underlying ``CreateProcess()`` operates on strings. the underlying ``CreateProcess()`` operates on strings.
The *shell* argument (which defaults to *False*) specifies whether to use The *shell* argument (which defaults to ``False``) specifies whether to use
the shell as the program to execute. If *shell* is *True*, it is the shell as the program to execute. If *shell* is ``True``, it is
recommended to pass *args* as a string rather than as a sequence. recommended to pass *args* as a string rather than as a sequence.
On POSIX with ``shell=True``, the shell defaults to :file:`/bin/sh`. If On POSIX with ``shell=True``, the shell defaults to :file:`/bin/sh`. If
......
...@@ -543,7 +543,7 @@ task isn't already covered by the URL parsing functions above. ...@@ -543,7 +543,7 @@ task isn't already covered by the URL parsing functions above.
When a sequence of two-element tuples is used as the *query* When a sequence of two-element tuples is used as the *query*
argument, the first element of each tuple is a key and the second is a argument, the first element of each tuple is a key and the second is a
value. The value element in itself can be a sequence and in that case, if value. The value element in itself can be a sequence and in that case, if
the optional parameter *doseq* is evaluates to *True*, individual the optional parameter *doseq* is evaluates to ``True``, individual
``key=value`` pairs separated by ``'&'`` are generated for each element of ``key=value`` pairs separated by ``'&'`` are generated for each element of
the value sequence for the key. The order of parameters in the encoded the value sequence for the key. The order of parameters in the encoded
string will match the order of parameter tuples in the sequence. string will match the order of parameter tuples in the sequence.
......
...@@ -928,7 +928,7 @@ ElementTree Objects ...@@ -928,7 +928,7 @@ ElementTree Objects
*method* is either ``"xml"``, ``"html"`` or ``"text"`` (default is *method* is either ``"xml"``, ``"html"`` or ``"text"`` (default is
``"xml"``). ``"xml"``).
The keyword-only *short_empty_elements* parameter controls the formatting The keyword-only *short_empty_elements* parameter controls the formatting
of elements that contain no content. If *True* (the default), they are of elements that contain no content. If ``True`` (the default), they are
emitted as a single self-closed tag, otherwise they are emitted as a pair emitted as a single self-closed tag, otherwise they are emitted as a pair
of start/end tags. of start/end tags.
......
...@@ -63,8 +63,8 @@ or as base classes. ...@@ -63,8 +63,8 @@ or as base classes.
should be a file-like object which will default to *sys.stdout*. *encoding* is should be a file-like object which will default to *sys.stdout*. *encoding* is
the encoding of the output stream which defaults to ``'iso-8859-1'``. the encoding of the output stream which defaults to ``'iso-8859-1'``.
*short_empty_elements* controls the formatting of elements that contain no *short_empty_elements* controls the formatting of elements that contain no
content: if *False* (the default) they are emitted as a pair of start/end content: if ``False`` (the default) they are emitted as a pair of start/end
tags, if set to *True* they are emitted as a single self-closed tag. tags, if set to ``True`` they are emitted as a single self-closed tag.
.. versionadded:: 3.2 .. versionadded:: 3.2
The *short_empty_elements* parameter. The *short_empty_elements* parameter.
......
...@@ -548,5 +548,5 @@ that may require changes to your code: ...@@ -548,5 +548,5 @@ that may require changes to your code:
* The automatic name remapping in the pickle module for protocol 2 or lower can * The automatic name remapping in the pickle module for protocol 2 or lower can
make Python 3.1 pickles unreadable in Python 3.0. One solution is to use make Python 3.1 pickles unreadable in Python 3.0. One solution is to use
protocol 3. Another solution is to set the *fix_imports* option to **False**. protocol 3. Another solution is to set the *fix_imports* option to *``False``*.
See the discussion above for more details. See the discussion above for more details.
...@@ -1001,13 +1001,13 @@ datetime and time ...@@ -1001,13 +1001,13 @@ datetime and time
after 1900. The new supported year range is from 1000 to 9999 inclusive. after 1900. The new supported year range is from 1000 to 9999 inclusive.
* Whenever a two-digit year is used in a time tuple, the interpretation has been * Whenever a two-digit year is used in a time tuple, the interpretation has been
governed by :attr:`time.accept2dyear`. The default is *True* which means that governed by :attr:`time.accept2dyear`. The default is ``True`` which means that
for a two-digit year, the century is guessed according to the POSIX rules for a two-digit year, the century is guessed according to the POSIX rules
governing the ``%y`` strptime format. governing the ``%y`` strptime format.
Starting with Py3.2, use of the century guessing heuristic will emit a Starting with Py3.2, use of the century guessing heuristic will emit a
:exc:`DeprecationWarning`. Instead, it is recommended that :exc:`DeprecationWarning`. Instead, it is recommended that
:attr:`time.accept2dyear` be set to *False* so that large date ranges :attr:`time.accept2dyear` be set to ``False`` so that large date ranges
can be used without guesswork:: can be used without guesswork::
>>> import time, warnings >>> import time, warnings
...@@ -1043,7 +1043,7 @@ The :mod:`math` module has been updated with six new functions inspired by the ...@@ -1043,7 +1043,7 @@ The :mod:`math` module has been updated with six new functions inspired by the
C99 standard. C99 standard.
The :func:`~math.isfinite` function provides a reliable and fast way to detect The :func:`~math.isfinite` function provides a reliable and fast way to detect
special values. It returns *True* for regular numbers and *False* for *Nan* or special values. It returns ``True`` for regular numbers and ``False`` for *Nan* or
*Infinity*: *Infinity*:
>>> from math import isfinite >>> from math import isfinite
...@@ -1193,7 +1193,7 @@ exception or silently drop the event depending on the value of ...@@ -1193,7 +1193,7 @@ exception or silently drop the event depending on the value of
The use of filters has been simplified. Instead of creating a The use of filters has been simplified. Instead of creating a
:class:`~logging.Filter` object, the predicate can be any Python callable that :class:`~logging.Filter` object, the predicate can be any Python callable that
returns *True* or *False*. returns ``True`` or ``False``.
There were a number of other improvements that add flexibility and simplify There were a number of other improvements that add flexibility and simplify
configuration. See the module documentation for a full listing of changes in configuration. See the module documentation for a full listing of changes in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment