Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 4659ddc

Browse files
committed
Merge doc fixes from 3.5
2 parents 758c7d0 + 8f13783 commit 4659ddc

File tree

18 files changed

+75
-75
lines changed

18 files changed

+75
-75
lines changed

Doc/howto/logging-cookbook.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,8 +2165,8 @@ Speaking logging messages
21652165
-------------------------
21662166

21672167
There might be situations when it is desirable to have logging messages rendered
2168-
in an audible rather than a visible format. This is easy to do if you have text-
2169-
to-speech (TTS) functionality available in your system, even if it doesn't have
2168+
in an audible rather than a visible format. This is easy to do if you have
2169+
text-to-speech (TTS) functionality available in your system, even if it doesn't have
21702170
a Python binding. Most TTS systems have a command line program you can run, and
21712171
this can be invoked from a handler using :mod:`subprocess`. It's assumed here
21722172
that TTS command line programs won't expect to interact with users or take a

Doc/library/argparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ArgumentParser objects
174174
* conflict_handler_ - The strategy for resolving conflicting optionals
175175
(usually unnecessary)
176176

177-
* add_help_ - Add a -h/--help option to the parser (default: ``True``)
177+
* add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)
178178

179179
* allow_abbrev_ - Allows long options to be abbreviated if the
180180
abbreviation is unambiguous. (default: ``True``)
@@ -211,7 +211,7 @@ The help for this program will display ``myprogram.py`` as the program name
211211
-h, --help show this help message and exit
212212
--foo FOO foo help
213213
$ cd ..
214-
$ python subdir\myprogram.py --help
214+
$ python subdir/myprogram.py --help
215215
usage: myprogram.py [-h] [--foo FOO]
216216
217217
optional arguments:

Doc/library/logging.config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ in :mod:`logging` itself) and defining handlers which are declared either in
105105
:param disable_existing_loggers: If specified as ``False``, loggers which
106106
exist when this call is made are left
107107
enabled. The default is ``True`` because this
108-
enables old behaviour in a backward-
109-
compatible way. This behaviour is to
108+
enables old behaviour in a
109+
backward-compatible way. This behaviour is to
110110
disable any existing loggers unless they or
111111
their ancestors are explicitly named in the
112112
logging configuration.

Doc/library/logging.handlers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,8 @@ possible, while any potentially slow operations (such as sending an email via
946946
.. class:: QueueHandler(queue)
947947

948948
Returns a new instance of the :class:`QueueHandler` class. The instance is
949-
initialized with the queue to send messages to. The queue can be any queue-
950-
like object; it's used as-is by the :meth:`enqueue` method, which needs
949+
initialized with the queue to send messages to. The queue can be any
950+
queue-like object; it's used as-is by the :meth:`enqueue` method, which needs
951951
to know how to send messages to it.
952952

953953

@@ -1002,8 +1002,8 @@ possible, while any potentially slow operations (such as sending an email via
10021002

10031003
Returns a new instance of the :class:`QueueListener` class. The instance is
10041004
initialized with the queue to send messages to and a list of handlers which
1005-
will handle entries placed on the queue. The queue can be any queue-
1006-
like object; it's passed as-is to the :meth:`dequeue` method, which needs
1005+
will handle entries placed on the queue. The queue can be any queue-like
1006+
object; it's passed as-is to the :meth:`dequeue` method, which needs
10071007
to know how to get messages from it. If ``respect_handler_level`` is ``True``,
10081008
a handler's level is respected (compared with the level for the message) when
10091009
deciding whether to pass messages to that handler; otherwise, the behaviour

Doc/library/quopri.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ sending a graphics file.
3232

3333
.. function:: encode(input, output, quotetabs, header=False)
3434

35-
Encode the contents of the *input* file and write the resulting quoted-
36-
printable data to the *output* file. *input* and *output* must be
35+
Encode the contents of the *input* file and write the resulting quoted-printable
36+
data to the *output* file. *input* and *output* must be
3737
:term:`binary file objects <file object>`. *quotetabs*, a flag which controls
3838
whether to encode embedded spaces and tabs must be provideda and when true it
3939
encodes such embedded whitespace, and when false it leaves them unencoded.

Doc/library/socket.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,8 +1342,8 @@ to sockets.
13421342
to transmit as opposed to sending the file until EOF is reached. File
13431343
position is updated on return or also in case of error in which case
13441344
:meth:`file.tell() <io.IOBase.tell>` can be used to figure out the number of
1345-
bytes which were sent. The socket must be of :const:`SOCK_STREAM` type. Non-
1346-
blocking sockets are not supported.
1345+
bytes which were sent. The socket must be of :const:`SOCK_STREAM` type.
1346+
Non-blocking sockets are not supported.
13471347

13481348
.. versionadded:: 3.5
13491349

Doc/library/unittest.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,11 +1637,11 @@ Loading and running tests
16371637

16381638
The method optionally resolves *name* relative to the given *module*.
16391639

1640-
.. versionchanged:: 3.5
1641-
If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing
1642-
*name* then a synthetic test that raises that error when run will be
1643-
returned. These errors are included in the errors accumulated by
1644-
self.errors.
1640+
.. versionchanged:: 3.5
1641+
If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing
1642+
*name* then a synthetic test that raises that error when run will be
1643+
returned. These errors are included in the errors accumulated by
1644+
self.errors.
16451645

16461646

16471647
.. method:: loadTestsFromNames(names, module=None)

Doc/whatsnew/2.0.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ strings. Unicode uses 16-bit numbers to represent characters instead of the
145145
8-bit number used by ASCII, meaning that 65,536 distinct characters can be
146146
supported.
147147

148-
The final interface for Unicode support was arrived at through countless often-
149-
stormy discussions on the python-dev mailing list, and mostly implemented by
148+
The final interface for Unicode support was arrived at through countless
149+
often-stormy discussions on the python-dev mailing list, and mostly implemented by
150150
Marc-André Lemburg, based on a Unicode string type implementation by Fredrik
151151
Lundh. A detailed explanation of the interface was written up as :pep:`100`,
152152
"Python Unicode Integration". This article will simply cover the most
@@ -885,8 +885,8 @@ interfaces for processing XML have become common: SAX2 (version 2 of the Simple
885885
API for XML) provides an event-driven interface with some similarities to
886886
:mod:`xmllib`, and the DOM (Document Object Model) provides a tree-based
887887
interface, transforming an XML document into a tree of nodes that can be
888-
traversed and modified. Python 2.0 includes a SAX2 interface and a stripped-
889-
down DOM interface as part of the :mod:`xml` package. Here we will give a brief
888+
traversed and modified. Python 2.0 includes a SAX2 interface and a stripped-down
889+
DOM interface as part of the :mod:`xml` package. Here we will give a brief
890890
overview of these new interfaces; consult the Python documentation or the source
891891
code for complete details. The Python XML SIG is also working on improved
892892
documentation.

Doc/whatsnew/2.1.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ precede any statement that will result in bytecodes being produced.
159159
PEP 207: Rich Comparisons
160160
=========================
161161

162-
In earlier versions, Python's support for implementing comparisons on user-
163-
defined classes and extension types was quite simple. Classes could implement a
162+
In earlier versions, Python's support for implementing comparisons on user-defined
163+
classes and extension types was quite simple. Classes could implement a
164164
:meth:`__cmp__` method that was given two instances of a class, and could only
165165
return 0 if they were equal or +1 or -1 if they weren't; the method couldn't
166166
raise an exception or return anything other than a Boolean value. Users of
@@ -465,11 +465,11 @@ Windows being the primary examples; on these systems, it's impossible to
465465
distinguish the filenames ``FILE.PY`` and ``file.py``, even though they do store
466466
the file's name in its original case (they're case-preserving, too).
467467

468-
In Python 2.1, the :keyword:`import` statement will work to simulate case-
469-
sensitivity on case-insensitive platforms. Python will now search for the first
468+
In Python 2.1, the :keyword:`import` statement will work to simulate case-sensitivity
469+
on case-insensitive platforms. Python will now search for the first
470470
case-sensitive match by default, raising an :exc:`ImportError` if no such file
471-
is found, so ``import file`` will not import a module named ``FILE.PY``. Case-
472-
insensitive matching can be requested by setting the :envvar:`PYTHONCASEOK`
471+
is found, so ``import file`` will not import a module named ``FILE.PY``.
472+
Case-insensitive matching can be requested by setting the :envvar:`PYTHONCASEOK`
473473
environment variable before starting the Python interpreter.
474474

475475
.. ======================================================================
@@ -481,8 +481,8 @@ PEP 217: Interactive Display Hook
481481
When using the Python interpreter interactively, the output of commands is
482482
displayed using the built-in :func:`repr` function. In Python 2.1, the variable
483483
:func:`sys.displayhook` can be set to a callable object which will be called
484-
instead of :func:`repr`. For example, you can set it to a special pretty-
485-
printing function::
484+
instead of :func:`repr`. For example, you can set it to a special
485+
pretty-printing function::
486486

487487
>>> # Create a recursive data structure
488488
... L = [1,2,3]

Doc/whatsnew/2.2.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,8 @@ New and Improved Modules
962962
* The new :mod:`hmac` module implements the HMAC algorithm described by
963963
:rfc:`2104`. (Contributed by Gerhard Häring.)
964964

965-
* Several functions that originally returned lengthy tuples now return pseudo-
966-
sequences that still behave like tuples but also have mnemonic attributes such
965+
* Several functions that originally returned lengthy tuples now return
966+
pseudo-sequences that still behave like tuples but also have mnemonic attributes such
967967
as memberst_mtime or :attr:`tm_year`. The enhanced functions include
968968
:func:`stat`, :func:`fstat`, :func:`statvfs`, and :func:`fstatvfs` in the
969969
:mod:`os` module, and :func:`localtime`, :func:`gmtime`, and :func:`strptime` in
@@ -1141,8 +1141,8 @@ Some of the more notable changes are:
11411141

11421142
The most significant change is the ability to build Python as a framework,
11431143
enabled by supplying the :option:`!--enable-framework` option to the configure
1144-
script when compiling Python. According to Jack Jansen, "This installs a self-
1145-
contained Python installation plus the OS X framework "glue" into
1144+
script when compiling Python. According to Jack Jansen, "This installs a
1145+
self-contained Python installation plus the OS X framework "glue" into
11461146
:file:`/Library/Frameworks/Python.framework` (or another location of choice).
11471147
For now there is little immediate added benefit to this (actually, there is the
11481148
disadvantage that you have to change your PATH to be able to find Python), but

0 commit comments

Comments
 (0)