Skip to content

Commit ea9342a

Browse files
committed
Avoid line breaks after hyphens, otherwise they are turned into spaces
1 parent 1234488 commit ea9342a

File tree

9 files changed

+56
-56
lines changed

9 files changed

+56
-56
lines changed

Doc/howto/logging-cookbook.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,8 @@ Speaking logging messages
11791179
-------------------------
11801180

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

Doc/library/logging.config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ in :mod:`logging` itself) and defining handlers which are declared either in
9393
:param disable_existing_loggers: If specified as ``False``, loggers which
9494
exist when this call is made are left
9595
enabled. The default is ``True`` because this
96-
enables old behaviour in a backward-
97-
compatible way. This behaviour is to
96+
enables old behaviour in a
97+
backward-compatible way. This behaviour is to
9898
disable any existing loggers unless they or
9999
their ancestors are explicitly named in the
100100
logging configuration.

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

Doc/whatsnew/2.3.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ The union and intersection of sets can be computed with the :meth:`union` and
8686
It's also possible to take the symmetric difference of two sets. This is the
8787
set of all elements in the union that aren't in the intersection. Another way
8888
of putting it is that the symmetric difference contains all elements that are in
89-
exactly one set. Again, there's an alternative notation (``^``), and an in-
90-
place version with the ungainly name :meth:`symmetric_difference_update`. ::
89+
exactly one set. Again, there's an alternative notation (``^``), and an
90+
in-place version with the ungainly name :meth:`symmetric_difference_update`. ::
9191

9292
>>> S1 = sets.Set([1,2,3,4])
9393
>>> S2 = sets.Set([3,4,5,6])
@@ -288,8 +288,8 @@ use characters outside of the usual alphanumerics.
288288
PEP 273: Importing Modules from ZIP Archives
289289
============================================
290290

291-
The new :mod:`zipimport` module adds support for importing modules from a ZIP-
292-
format archive. You don't need to import the module explicitly; it will be
291+
The new :mod:`zipimport` module adds support for importing modules from a
292+
ZIP-format archive. You don't need to import the module explicitly; it will be
293293
automatically imported if a ZIP archive's filename is added to ``sys.path``.
294294
For example:
295295

@@ -375,8 +375,8 @@ PEP 278: Universal Newline Support
375375
==================================
376376

377377
The three major operating systems used today are Microsoft Windows, Apple's
378-
Macintosh OS, and the various Unix derivatives. A minor irritation of cross-
379-
platform work is that these three platforms all use different characters to
378+
Macintosh OS, and the various Unix derivatives. A minor irritation of
379+
cross-platform work is that these three platforms all use different characters to
380380
mark the ends of lines in text files. Unix uses the linefeed (ASCII character
381381
10), MacOS uses the carriage return (ASCII character 13), and Windows uses a
382382
two-character sequence of a carriage return plus a newline.

Doc/whatsnew/2.4.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ Sometimes you can see this inaccuracy when the number is printed::
517517
>>> 1.1
518518
1.1000000000000001
519519

520-
The inaccuracy isn't always visible when you print the number because the FP-to-
521-
decimal-string conversion is provided by the C library, and most C libraries try
520+
The inaccuracy isn't always visible when you print the number because the
521+
FP-to-decimal-string conversion is provided by the C library, and most C libraries try
522522
to produce sensible output. Even if it's not displayed, however, the inaccuracy
523523
is still there and subsequent operations can magnify the error.
524524

@@ -595,8 +595,8 @@ exponent::
595595
...
596596
decimal.InvalidOperation: x ** (non-integer)
597597

598-
You can combine :class:`Decimal` instances with integers, but not with floating-
599-
point numbers::
598+
You can combine :class:`Decimal` instances with integers, but not with
599+
floating-point numbers::
600600

601601
>>> a + 4
602602
Decimal("39.72")
@@ -684,8 +684,8 @@ includes a quick-start tutorial and a reference.
684684
Raymond Hettinger, Aahz, and Tim Peters.
685685

686686
http://www.lahey.com/float.htm
687-
The article uses Fortran code to illustrate many of the problems that floating-
688-
point inaccuracy can cause.
687+
The article uses Fortran code to illustrate many of the problems that
688+
floating-point inaccuracy can cause.
689689

690690
http://speleotrove.com/decimal/
691691
A description of a decimal-based representation. This representation is being
@@ -741,8 +741,8 @@ functions in Python's implementation required that the numeric locale remain set
741741
to the ``'C'`` locale. Often this was because the code was using the C
742742
library's :c:func:`atof` function.
743743

744-
Not setting the numeric locale caused trouble for extensions that used third-
745-
party C libraries, however, because they wouldn't have the correct locale set.
744+
Not setting the numeric locale caused trouble for extensions that used third-party
745+
C libraries, however, because they wouldn't have the correct locale set.
746746
The motivating example was GTK+, whose user interface widgets weren't displaying
747747
numbers in the current locale.
748748

@@ -918,8 +918,8 @@ Here are all of the changes that Python 2.4 makes to the core Python language.
918918

919919
(Contributed by Raymond Hettinger.)
920920

921-
* Encountering a failure while importing a module no longer leaves a partially-
922-
initialized module object in ``sys.modules``. The incomplete module object left
921+
* Encountering a failure while importing a module no longer leaves a partially-initialized
922+
module object in ``sys.modules``. The incomplete module object left
923923
behind would fool further imports of the same module into succeeding, leading to
924924
confusing errors. (Fixed by Tim Peters.)
925925

@@ -1028,8 +1028,8 @@ complete list of changes, or look through the CVS logs for all the details.
10281028
previous ones left off. (Implemented by Walter Dörwald.)
10291029

10301030
* There is a new :mod:`collections` module for various specialized collection
1031-
datatypes. Currently it contains just one type, :class:`deque`, a double-
1032-
ended queue that supports efficiently adding and removing elements from either
1031+
datatypes. Currently it contains just one type, :class:`deque`, a double-ended
1032+
queue that supports efficiently adding and removing elements from either
10331033
end::
10341034

10351035
>>> from collections import deque
@@ -1485,8 +1485,8 @@ Some of the changes to Python's build process and to the C API are:
14851485
intended as an aid to people developing the Python core. Providing
14861486
:option:`!--enable-profiling` to the :program:`configure` script will let you
14871487
profile the interpreter with :program:`gprof`, and providing the
1488-
:option:`!--with-tsc` switch enables profiling using the Pentium's Time-Stamp-
1489-
Counter register. Note that the :option:`!--with-tsc` switch is slightly
1488+
:option:`!--with-tsc` switch enables profiling using the Pentium's
1489+
Time-Stamp-Counter register. Note that the :option:`!--with-tsc` switch is slightly
14901490
misnamed, because the profiling feature also works on the PowerPC platform,
14911491
though that processor architecture doesn't call that register "the TSC
14921492
register". (Contributed by Jeremy Hylton.)
@@ -1540,8 +1540,8 @@ code:
15401540

15411541
* The :mod:`tarfile` module now generates GNU-format tar files by default.
15421542

1543-
* Encountering a failure while importing a module no longer leaves a partially-
1544-
initialized module object in ``sys.modules``.
1543+
* Encountering a failure while importing a module no longer leaves a
1544+
partially-initialized module object in ``sys.modules``.
15451545

15461546
* :const:`None` is now a constant; code that binds a new value to the name
15471547
``None`` is now a syntax error.

Doc/whatsnew/2.5.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ Here's a small but realistic example::
157157
server_log = functools.partial(log, subsystem='server')
158158
server_log('Unable to open socket')
159159

160-
Here's another example, from a program that uses PyGTK. Here a context-
161-
sensitive pop-up menu is being constructed dynamically. The callback provided
160+
Here's another example, from a program that uses PyGTK. Here a context-sensitive
161+
pop-up menu is being constructed dynamically. The callback provided
162162
for the menu option is a partially applied version of the :meth:`open_item`
163163
method, where the first argument has been provided. ::
164164

@@ -171,8 +171,8 @@ method, where the first argument has been provided. ::
171171
popup_menu.append( ("Open", open_func, 1) )
172172

173173
Another function in the :mod:`functools` module is the
174-
``update_wrapper(wrapper, wrapped)`` function that helps you write well-
175-
behaved decorators. :func:`update_wrapper` copies the name, module, and
174+
``update_wrapper(wrapper, wrapped)`` function that helps you write
175+
well-behaved decorators. :func:`update_wrapper` copies the name, module, and
176176
docstring attribute to a wrapper function so that tracebacks inside the wrapped
177177
function are easier to understand. For example, you might write::
178178

@@ -297,8 +297,8 @@ can't protect against having your submodule's name being used for a new module
297297
added in a future version of Python.
298298

299299
In Python 2.5, you can switch :keyword:`import`'s behaviour to absolute imports
300-
using a ``from __future__ import absolute_import`` directive. This absolute-
301-
import behaviour will become the default in a future version (probably Python
300+
using a ``from __future__ import absolute_import`` directive. This absolute-import
301+
behaviour will become the default in a future version (probably Python
302302
2.7). Once absolute imports are the default, ``import string`` will always
303303
find the standard library's version. It's suggested that users should begin
304304
using absolute imports as much as possible, so it's preferable to begin writing
@@ -602,8 +602,8 @@ be used with the ':keyword:`with`' statement. File objects are one example::
602602
... more processing code ...
603603

604604
After this statement has executed, the file object in *f* will have been
605-
automatically closed, even if the :keyword:`for` loop raised an exception part-
606-
way through the block.
605+
automatically closed, even if the :keyword:`for` loop raised an exception
606+
part-way through the block.
607607

608608
.. note::
609609

@@ -1558,8 +1558,8 @@ complete list of changes, or look through the SVN logs for all the details.
15581558

15591559
You can also pack and unpack data to and from buffer objects directly using the
15601560
``pack_into(buffer, offset, v1, v2, ...)`` and ``unpack_from(buffer,
1561-
offset)`` methods. This lets you store data directly into an array or a memory-
1562-
mapped file.
1561+
offset)`` methods. This lets you store data directly into an array or a
1562+
memory-mapped file.
15631563

15641564
(:class:`Struct` objects were implemented by Bob Ippolito at the NeedForSpeed
15651565
sprint. Support for buffer objects was added by Martin Blais, also at the
@@ -2281,8 +2281,8 @@ Acknowledgements
22812281

22822282
The author would like to thank the following people for offering suggestions,
22832283
corrections and assistance with various drafts of this article: Georg Brandl,
2284-
Nick Coghlan, Phillip J. Eby, Lars Gustäbel, Raymond Hettinger, Ralf W. Grosse-
2285-
Kunstleve, Kent Johnson, Iain Lowe, Martin von Löwis, Fredrik Lundh, Andrew
2284+
Nick Coghlan, Phillip J. Eby, Lars Gustäbel, Raymond Hettinger, Ralf W.
2285+
Grosse-Kunstleve, Kent Johnson, Iain Lowe, Martin von Löwis, Fredrik Lundh, Andrew
22862286
McNamara, Skip Montanaro, Gustavo Niemeyer, Paul Prescod, James Pryor, Mike
22872287
Rovner, Scott Weikart, Barry Warsaw, Thomas Wouters.
22882288

Doc/whatsnew/2.6.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ be used with the ':keyword:`with`' statement. File objects are one example::
286286
... more processing code ...
287287

288288
After this statement has executed, the file object in *f* will have been
289-
automatically closed, even if the :keyword:`for` loop raised an exception part-
290-
way through the block.
289+
automatically closed, even if the :keyword:`for` loop raised an exception
290+
part-way through the block.
291291

292292
.. note::
293293

0 commit comments

Comments
 (0)