Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2a353e92
Commit
2a353e92
authored
Nov 26, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #28763: Use double hyphens (rendered as en-dashes) in numerical ranges
in the documentation.
parent
fadc937c
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
25 additions
and
25 deletions
+25
-25
Doc/faq/design.rst
Doc/faq/design.rst
+2
-2
Doc/faq/general.rst
Doc/faq/general.rst
+1
-1
Doc/howto/urllib2.rst
Doc/howto/urllib2.rst
+2
-2
Doc/library/calendar.rst
Doc/library/calendar.rst
+1
-1
Doc/library/cmath.rst
Doc/library/cmath.rst
+1
-1
Doc/library/codecs.rst
Doc/library/codecs.rst
+3
-3
Doc/library/curses.ascii.rst
Doc/library/curses.ascii.rst
+1
-1
Doc/library/curses.rst
Doc/library/curses.rst
+1
-1
Doc/library/functions.rst
Doc/library/functions.rst
+1
-1
Doc/library/ipaddress.rst
Doc/library/ipaddress.rst
+1
-1
Doc/library/json.rst
Doc/library/json.rst
+1
-1
Doc/library/random.rst
Doc/library/random.rst
+1
-1
Doc/library/statistics.rst
Doc/library/statistics.rst
+3
-3
Doc/library/sys.rst
Doc/library/sys.rst
+1
-1
Doc/whatsnew/2.1.rst
Doc/whatsnew/2.1.rst
+1
-1
Doc/whatsnew/2.7.rst
Doc/whatsnew/2.7.rst
+2
-2
Doc/whatsnew/3.5.rst
Doc/whatsnew/3.5.rst
+2
-2
No files found.
Doc/faq/design.rst
View file @
2a353e92
...
@@ -31,7 +31,7 @@ least slightly uneasy when reading (or being required to write) another style.
...
@@ -31,7 +31,7 @@ least slightly uneasy when reading (or being required to write) another style.
Many coding styles place begin/end brackets on a line by themselves. This makes
Many coding styles place begin/end brackets on a line by themselves. This makes
programs considerably longer and wastes valuable screen space, making it harder
programs considerably longer and wastes valuable screen space, making it harder
to get a good overview of a program. Ideally, a function should fit on one
to get a good overview of a program. Ideally, a function should fit on one
screen (say, 20-30 lines). 20 lines of Python can do a lot more work than 20
screen (say, 20-
-
30 lines). 20 lines of Python can do a lot more work than 20
lines of C. This is not solely due to the lack of begin/end brackets -- the
lines of C. This is not solely due to the lack of begin/end brackets -- the
lack of declarations and the high-level data types are also responsible -- but
lack of declarations and the high-level data types are also responsible -- but
the indentation-based syntax certainly helps.
the indentation-based syntax certainly helps.
...
@@ -77,7 +77,7 @@ which is exactly::
...
@@ -77,7 +77,7 @@ which is exactly::
1.1999999999999999555910790149937383830547332763671875 (decimal)
1.1999999999999999555910790149937383830547332763671875 (decimal)
The typical precision of 53 bits provides Python floats with 15-16
The typical precision of 53 bits provides Python floats with 15-
-
16
decimal digits of accuracy.
decimal digits of accuracy.
For a fuller explanation, please see the :ref:`floating point arithmetic
For a fuller explanation, please see the :ref:`floating point arithmetic
...
...
Doc/faq/general.rst
View file @
2a353e92
...
@@ -252,7 +252,7 @@ outdated.
...
@@ -252,7 +252,7 @@ outdated.
Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers
Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers
Using the Python Programming Language", CWI Quarterly, Volume 4, Issue 4
Using the Python Programming Language", CWI Quarterly, Volume 4, Issue 4
(December 1991), Amsterdam, pp 283-303.
(December 1991), Amsterdam, pp 283-
-
303.
Are there any books on Python?
Are there any books on Python?
...
...
Doc/howto/urllib2.rst
View file @
2a353e92
...
@@ -240,8 +240,8 @@ Error Codes
...
@@ -240,8 +240,8 @@ Error Codes
~~~~~~~~~~~
~~~~~~~~~~~
Because the default handlers handle redirects (codes in the 300 range), and
Because the default handlers handle redirects (codes in the 300 range), and
codes in the 100-299 range indicate success, you will usually only see error
codes in the 100-
-
299 range indicate success, you will usually only see error
codes in the 400-599 range.
codes in the 400-
-
599 range.
:attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary of
:attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary of
response codes in that shows all the response codes used by RFC 2616. The
response codes in that shows all the response codes used by RFC 2616. The
...
...
Doc/library/calendar.rst
View file @
2a353e92
...
@@ -47,7 +47,7 @@ it's the base calendar for all computations.
...
@@ -47,7 +47,7 @@ it's the base calendar for all computations.
.. method:: itermonthdates(year, month)
.. method:: itermonthdates(year, month)
Return an iterator for the month *month* (1-12) in the year *year*. This
Return an iterator for the month *month* (1-
-
12) in the year *year*. This
iterator will return all days (as :class:`datetime.date` objects) for the
iterator will return all days (as :class:`datetime.date` objects) for the
month and all days before the start of the month or after the end of the
month and all days before the start of the month or after the end of the
month that are required to get a complete week.
month that are required to get a complete week.
...
...
Doc/library/cmath.rst
View file @
2a353e92
...
@@ -275,6 +275,6 @@ cuts for numerical purposes, a good reference should be the following:
...
@@ -275,6 +275,6 @@ cuts for numerical purposes, a good reference should be the following:
Kahan, W: Branch cuts for complex elementary functions; or, Much ado about
Kahan, W: Branch cuts for complex elementary functions; or, Much ado about
nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the art
nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the art
in numerical analysis. Clarendon Press (1987) pp165-211.
in numerical analysis. Clarendon Press (1987) pp165-
-
211.
Doc/library/codecs.rst
View file @
2a353e92
...
@@ -858,7 +858,7 @@ Encodings and Unicode
...
@@ -858,7 +858,7 @@ Encodings and Unicode
---------------------
---------------------
Strings are stored internally as sequences of code points in
Strings are stored internally as sequences of code points in
range ``0x0``-``0x10FFFF``. (See :pep:`393` for
range ``0x0``-
-
``0x10FFFF``. (See :pep:`393` for
more details about the implementation.)
more details about the implementation.)
Once a string object is used outside of CPU and memory, endianness
Once a string object is used outside of CPU and memory, endianness
and how these arrays are stored as bytes become an issue. As with other
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
...
@@ -868,7 +868,7 @@ There are a variety of different text serialisation codecs, which are
collectivity referred to as :term:`text encodings <text encoding>`.
collectivity referred to as :term:`text encodings <text encoding>`.
The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps
The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps
the code points 0-
255 to the bytes ``0x0``
-``0xff``, which means that a string
the code points 0-
-255 to the bytes ``0x0``-
-``0xff``, which means that a string
object that contains code points above ``U+00FF`` can't be encoded with this
object that contains code points above ``U+00FF`` can't be encoded with this
codec. Doing so will raise a :exc:`UnicodeEncodeError` that looks
codec. Doing so will raise a :exc:`UnicodeEncodeError` that looks
like the following (although the details of the error message may differ):
like the following (although the details of the error message may differ):
...
@@ -877,7 +877,7 @@ position 3: ordinal not in range(256)``.
...
@@ -877,7 +877,7 @@ position 3: ordinal not in range(256)``.
There's another group of encodings (the so called charmap encodings) that choose
There's another group of encodings (the so called charmap encodings) that choose
a different subset of all Unicode code points and how these code points are
a different subset of all Unicode code points and how these code points are
mapped to the bytes ``0x0``-``0xff``. To see how this is done simply open
mapped to the bytes ``0x0``-
-
``0xff``. To see how this is done simply open
e.g. :file:`encodings/cp1252.py` (which is an encoding that is used primarily on
e.g. :file:`encodings/cp1252.py` (which is an encoding that is used primarily on
Windows). There's a string constant with 256 characters that shows you which
Windows). There's a string constant with 256 characters that shows you which
character is mapped to which byte value.
character is mapped to which byte value.
...
...
Doc/library/curses.ascii.rst
View file @
2a353e92
...
@@ -213,7 +213,7 @@ it returns a string.
...
@@ -213,7 +213,7 @@ it returns a string.
Return a string representation of the ASCII character *c*. If *c* is printable,
Return a string representation of the ASCII character *c*. If *c* is printable,
this string is the character itself. If the character is a control character
this string is the character itself. If the character is a control character
(0x00-0x1f) the string consists of a caret (``'^'``) followed by the
(0x00-
-
0x1f) the string consists of a caret (``'^'``) followed by the
corresponding uppercase letter. If the character is an ASCII delete (0x7f) the
corresponding uppercase letter. If the character is an ASCII delete (0x7f) the
string is ``'^?'``. If the character has its meta bit (0x80) set, the meta bit
string is ``'^?'``. If the character has its meta bit (0x80) set, the meta bit
is stripped, the preceding rules applied, and ``'!'`` prepended to the result.
is stripped, the preceding rules applied, and ``'!'`` prepended to the result.
...
...
Doc/library/curses.rst
View file @
2a353e92
...
@@ -316,7 +316,7 @@ The module :mod:`curses` defines the following functions:
...
@@ -316,7 +316,7 @@ The module :mod:`curses` defines the following functions:
Return the name of the key numbered *k*. The name of a key generating printable
Return the name of the key numbered *k*. The name of a key generating printable
ASCII character is the key's character. The name of a control-key combination
ASCII character is the key's character. The name of a control-key combination
is a two-character string consisting of a caret followed by the corresponding
is a two-character string consisting of a caret followed by the corresponding
printable ASCII character. The name of an alt-key combination (128-255) is a
printable ASCII character. The name of an alt-key combination (128-
-
255) is a
string consisting of the prefix 'M-' followed by the name of the corresponding
string consisting of the prefix 'M-' followed by the name of the corresponding
ASCII character.
ASCII character.
...
...
Doc/library/functions.rst
View file @
2a353e92
...
@@ -686,7 +686,7 @@ are always available. They are listed here in alphabetical order.
...
@@ -686,7 +686,7 @@ are always available. They are listed here in alphabetical order.
preceded by ``+`` or ``-`` (with no space in between) and surrounded by
preceded by ``+`` or ``-`` (with no space in between) and surrounded by
whitespace. A base-n literal consists of the digits 0 to n-1, with ``a``
whitespace. A base-n literal consists of the digits 0 to n-1, with ``a``
to ``z`` (or ``A`` to ``Z``) having
to ``z`` (or ``A`` to ``Z``) having
values 10 to 35. The default *base* is 10. The allowed values are 0 and 2-36.
values 10 to 35. The default *base* is 10. The allowed values are 0 and 2-
-
36.
Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``,
Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``,
``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0
``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0
means to interpret exactly as a code literal, so that the actual base is 2,
means to interpret exactly as a code literal, so that the actual base is 2,
...
...
Doc/library/ipaddress.rst
View file @
2a353e92
...
@@ -99,7 +99,7 @@ write code that handles both IP versions correctly.
...
@@ -99,7 +99,7 @@ write code that handles both IP versions correctly.
The following constitutes a valid IPv4 address:
The following constitutes a valid IPv4 address:
1. A string in decimal-dot notation, consisting of four decimal integers in
1. A string in decimal-dot notation, consisting of four decimal integers in
the inclusive range 0-255, separated by dots (e.g. ``192.168.0.1``). Each
the inclusive range 0-
-
255, separated by dots (e.g. ``192.168.0.1``). Each
integer represents an octet (byte) in the address. Leading zeroes are
integer represents an octet (byte) in the address. Leading zeroes are
tolerated only for values less than 8 (as there is no ambiguity
tolerated only for values less than 8 (as there is no ambiguity
between the decimal and octal interpretations of such strings).
between the decimal and octal interpretations of such strings).
...
...
Doc/library/json.rst
View file @
2a353e92
...
@@ -338,7 +338,7 @@ Encoders and Decoders
...
@@ -338,7 +338,7 @@ Encoders and Decoders
If *strict* is false (``True`` is the default), then control characters
If *strict* is false (``True`` is the default), then control characters
will be allowed inside strings. Control characters in this context are
will be allowed inside strings. Control characters in this context are
those with character codes in the 0-31 range, including ``'\t'`` (tab),
those with character codes in the 0-
-
31 range, including ``'\t'`` (tab),
``'\n'``, ``'\r'`` and ``'\0'``.
``'\n'``, ``'\r'`` and ``'\0'``.
If the data being deserialized is not a valid JSON document, a
If the data being deserialized is not a valid JSON document, a
...
...
Doc/library/random.rst
View file @
2a353e92
...
@@ -266,7 +266,7 @@ Alternative Generator:
...
@@ -266,7 +266,7 @@ Alternative Generator:
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-dimensionally
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-dimensionally
equidistributed uniform pseudorandom number generator", ACM Transactions on
equidistributed uniform pseudorandom number generator", ACM Transactions on
Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998.
Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-
-
30 1998.
`Complementary-Multiply-with-Carry recipe
`Complementary-Multiply-with-Carry recipe
...
...
Doc/library/statistics.rst
View file @
2a353e92
...
@@ -191,9 +191,9 @@ However, for reading convenience, most of the examples show sorted sequences.
...
@@ -191,9 +191,9 @@ However, for reading convenience, most of the examples show sorted sequences.
52.5
52.5
In the following example, the data are rounded, so that each value represents
In the following example, the data are rounded, so that each value represents
the midpoint of data classes, e.g. 1 is the midpoint of the class 0.5-1.5, 2
the midpoint of data classes, e.g. 1 is the midpoint of the class 0.5-
-
1.5, 2
is the midpoint of 1.5-
2.5, 3 is the midpoint of 2.5
-3.5, etc. With the data
is the midpoint of 1.5-
-2.5, 3 is the midpoint of 2.5-
-3.5, etc. With the data
given, the middle value falls somewhere in the class 3.5-4.5, and
given, the middle value falls somewhere in the class 3.5-
-
4.5, and
interpolation is used to estimate it:
interpolation is used to estimate it:
.. doctest::
.. doctest::
...
...
Doc/library/sys.rst
View file @
2a353e92
...
@@ -256,7 +256,7 @@ always available.
...
@@ -256,7 +256,7 @@ always available.
(defaulting to zero), or another type of object. If it is an integer, zero
(defaulting to zero), or another type of object. If it is an integer, zero
is considered "successful termination" and any nonzero value is considered
is considered "successful termination" and any nonzero value is considered
"abnormal termination" by shells and the like. Most systems require it to be
"abnormal termination" by shells and the like. Most systems require it to be
in the range 0-127, and produce undefined results otherwise. Some systems
in the range 0-
-
127, and produce undefined results otherwise. Some systems
have a convention for assigning specific meanings to specific exit codes, but
have a convention for assigning specific meanings to specific exit codes, but
these are generally underdeveloped; Unix programs generally use 2 for command
these are generally underdeveloped; Unix programs generally use 2 for command
line syntax errors and 1 for all other kind of errors. If another type of
line syntax errors and 1 for all other kind of errors. If another type of
...
...
Doc/whatsnew/2.1.rst
View file @
2a353e92
...
@@ -731,7 +731,7 @@ of the more notable changes are:
...
@@ -731,7 +731,7 @@ of the more notable changes are:
...
...
For
a
fuller
discussion
of
the
line
I
/
O
changes
,
see
the
python
-
dev
summary
for
For
a
fuller
discussion
of
the
line
I
/
O
changes
,
see
the
python
-
dev
summary
for
January
1
-
15
,
2001
at
https
://
mail
.
python
.
org
/
pipermail
/
python
-
dev
/
2001
-
January
/.
January
1
-
-
15
,
2001
at
https
://
mail
.
python
.
org
/
pipermail
/
python
-
dev
/
2001
-
January
/.
*
A
new
method
,
:
meth
:`
popitem
`,
was
added
to
dictionaries
to
enable
*
A
new
method
,
:
meth
:`
popitem
`,
was
added
to
dictionaries
to
enable
destructively
iterating
through
the
contents
of
a
dictionary
;
this
can
be
faster
destructively
iterating
through
the
contents
of
a
dictionary
;
this
can
be
faster
...
...
Doc/whatsnew/2.7.rst
View file @
2a353e92
...
@@ -104,7 +104,7 @@ Some key consequences of the long-term significance of 2.7 are:
...
@@ -104,7 +104,7 @@ Some key consequences of the long-term significance of 2.7 are:
when compared to earlier 2.x versions. Python 2.7 is currently expected to
when compared to earlier 2.x versions. Python 2.7 is currently expected to
remain supported by the core development team (receiving security updates
remain supported by the core development team (receiving security updates
and other bug fixes) until at least 2020 (10 years after its initial
and other bug fixes) until at least 2020 (10 years after its initial
release, compared to the more typical support period of 18-24 months).
release, compared to the more typical support period of 18-
-
24 months).
* As the Python 2.7 standard library ages, making effective use of the
* As the Python 2.7 standard library ages, making effective use of the
Python Package Index (either directly or via a redistributor) becomes
Python Package Index (either directly or via a redistributor) becomes
...
@@ -989,7 +989,7 @@ Several performance enhancements have been added:
...
@@ -989,7 +989,7 @@ Several performance enhancements have been added:
Gregory Smith; :issue:`1087418`).
Gregory Smith; :issue:`1087418`).
* The implementation of ``%`` checks for the left-side operand being
* The implementation of ``%`` checks for the left-side operand being
a Python string and special-cases it; this results in a 1-3%
a Python string and special-cases it; this results in a 1-
-
3%
performance increase for applications that frequently use ``%``
performance increase for applications that frequently use ``%``
with strings, such as templating libraries.
with strings, such as templating libraries.
(Implemented by Collin Winter; :issue:`5176`.)
(Implemented by Collin Winter; :issue:`5176`.)
...
...
Doc/whatsnew/3.5.rst
View file @
2a353e92
...
@@ -2129,8 +2129,8 @@ Many operations on :class:`io.BytesIO` are now 50% to 100% faster.
...
@@ -2129,8 +2129,8 @@ Many operations on :class:`io.BytesIO` are now 50% to 100% faster.
(Contributed by Serhiy Storchaka in :issue:`15381` and David Wilson in
(Contributed by Serhiy Storchaka in :issue:`15381` and David Wilson in
:issue:`22003`.)
:issue:`22003`.)
The :func:`marshal.dumps` function is now faster: 65-85% with versions 3
The :func:`marshal.dumps` function is now faster: 65-
-
85% with versions 3
and 4, 20-25% with versions 0 to 2 on typical data, and up to 5 times in
and 4, 20-
-
25% with versions 0 to 2 on typical data, and up to 5 times in
best cases.
best cases.
(Contributed by Serhiy Storchaka in :issue:`20416` and :issue:`23344`.)
(Contributed by Serhiy Storchaka in :issue:`20416` and :issue:`23344`.)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment