Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7b1a0b

Browse files
Issue #28763: Use double hyphens (rendered as en-dashes) in numerical ranges
in the documentation.
1 parent 4931122 commit c7b1a0b

17 files changed

Lines changed: 25 additions & 25 deletions

Doc/faq/design.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ least slightly uneasy when reading (or being required to write) another style.
3131
Many coding styles place begin/end brackets on a line by themselves. This makes
3232
programs considerably longer and wastes valuable screen space, making it harder
3333
to get a good overview of a program. Ideally, a function should fit on one
34-
screen (say, 20-30 lines). 20 lines of Python can do a lot more work than 20
34+
screen (say, 20--30 lines). 20 lines of Python can do a lot more work than 20
3535
lines of C. This is not solely due to the lack of begin/end brackets -- the
3636
lack of declarations and the high-level data types are also responsible -- but
3737
the indentation-based syntax certainly helps.
@@ -77,7 +77,7 @@ which is exactly::
7777

7878
1.1999999999999999555910790149937383830547332763671875 (decimal)
7979

80-
The typical precision of 53 bits provides Python floats with 15-16
80+
The typical precision of 53 bits provides Python floats with 15--16
8181
decimal digits of accuracy.
8282

8383
For a fuller explanation, please see the :ref:`floating point arithmetic

Doc/faq/general.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ outdated.
252252

253253
Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers
254254
Using the Python Programming Language", CWI Quarterly, Volume 4, Issue 4
255-
(December 1991), Amsterdam, pp 283-303.
255+
(December 1991), Amsterdam, pp 283--303.
256256

257257

258258
Are there any books on Python?

Doc/howto/urllib2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ Error Codes
240240
~~~~~~~~~~~
241241

242242
Because the default handlers handle redirects (codes in the 300 range), and
243-
codes in the 100-299 range indicate success, you will usually only see error
244-
codes in the 400-599 range.
243+
codes in the 100--299 range indicate success, you will usually only see error
244+
codes in the 400--599 range.
245245

246246
:attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary of
247247
response codes in that shows all the response codes used by RFC 2616. The

Doc/library/calendar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ it's the base calendar for all computations.
4747

4848
.. method:: itermonthdates(year, month)
4949

50-
Return an iterator for the month *month* (1-12) in the year *year*. This
50+
Return an iterator for the month *month* (1--12) in the year *year*. This
5151
iterator will return all days (as :class:`datetime.date` objects) for the
5252
month and all days before the start of the month or after the end of the
5353
month that are required to get a complete week.

Doc/library/cmath.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,6 @@ cuts for numerical purposes, a good reference should be the following:
275275

276276
Kahan, W: Branch cuts for complex elementary functions; or, Much ado about
277277
nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the art
278-
in numerical analysis. Clarendon Press (1987) pp165-211.
278+
in numerical analysis. Clarendon Press (1987) pp165--211.
279279

280280

Doc/library/codecs.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ Encodings and Unicode
858858
---------------------
859859

860860
Strings are stored internally as sequences of code points in
861-
range ``0x0``-``0x10FFFF``. (See :pep:`393` for
861+
range ``0x0``--``0x10FFFF``. (See :pep:`393` for
862862
more details about the implementation.)
863863
Once a string object is used outside of CPU and memory, endianness
864864
and how these arrays are stored as bytes become an issue. As with other
@@ -868,7 +868,7 @@ There are a variety of different text serialisation codecs, which are
868868
collectivity referred to as :term:`text encodings <text encoding>`.
869869

870870
The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps
871-
the code points 0-255 to the bytes ``0x0``-``0xff``, which means that a string
871+
the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a string
872872
object that contains code points above ``U+00FF`` can't be encoded with this
873873
codec. Doing so will raise a :exc:`UnicodeEncodeError` that looks
874874
like the following (although the details of the error message may differ):
@@ -877,7 +877,7 @@ position 3: ordinal not in range(256)``.
877877

878878
There's another group of encodings (the so called charmap encodings) that choose
879879
a different subset of all Unicode code points and how these code points are
880-
mapped to the bytes ``0x0``-``0xff``. To see how this is done simply open
880+
mapped to the bytes ``0x0``--``0xff``. To see how this is done simply open
881881
e.g. :file:`encodings/cp1252.py` (which is an encoding that is used primarily on
882882
Windows). There's a string constant with 256 characters that shows you which
883883
character is mapped to which byte value.

Doc/library/curses.ascii.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ it returns a string.
213213

214214
Return a string representation of the ASCII character *c*. If *c* is printable,
215215
this string is the character itself. If the character is a control character
216-
(0x00-0x1f) the string consists of a caret (``'^'``) followed by the
216+
(0x00--0x1f) the string consists of a caret (``'^'``) followed by the
217217
corresponding uppercase letter. If the character is an ASCII delete (0x7f) the
218218
string is ``'^?'``. If the character has its meta bit (0x80) set, the meta bit
219219
is stripped, the preceding rules applied, and ``'!'`` prepended to the result.

Doc/library/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ The module :mod:`curses` defines the following functions:
316316
Return the name of the key numbered *k*. The name of a key generating printable
317317
ASCII character is the key's character. The name of a control-key combination
318318
is a two-character string consisting of a caret followed by the corresponding
319-
printable ASCII character. The name of an alt-key combination (128-255) is a
319+
printable ASCII character. The name of an alt-key combination (128--255) is a
320320
string consisting of the prefix 'M-' followed by the name of the corresponding
321321
ASCII character.
322322

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ are always available. They are listed here in alphabetical order.
686686
preceded by ``+`` or ``-`` (with no space in between) and surrounded by
687687
whitespace. A base-n literal consists of the digits 0 to n-1, with ``a``
688688
to ``z`` (or ``A`` to ``Z``) having
689-
values 10 to 35. The default *base* is 10. The allowed values are 0 and 2-36.
689+
values 10 to 35. The default *base* is 10. The allowed values are 0 and 2--36.
690690
Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``,
691691
``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0
692692
means to interpret exactly as a code literal, so that the actual base is 2,

Doc/library/ipaddress.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ write code that handles both IP versions correctly.
9999
The following constitutes a valid IPv4 address:
100100

101101
1. A string in decimal-dot notation, consisting of four decimal integers in
102-
the inclusive range 0-255, separated by dots (e.g. ``192.168.0.1``). Each
102+
the inclusive range 0--255, separated by dots (e.g. ``192.168.0.1``). Each
103103
integer represents an octet (byte) in the address. Leading zeroes are
104104
tolerated only for values less than 8 (as there is no ambiguity
105105
between the decimal and octal interpretations of such strings).

0 commit comments

Comments
 (0)