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

Skip to content

Commit 891391b

Browse files
committed
Merge doc fixes.
2 parents 13039c8 + 1d0a0f5 commit 891391b

8 files changed

Lines changed: 23 additions & 24 deletions

File tree

Doc/howto/regex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ devoted to discussing various metacharacters and what they do.
7676
Here's a complete list of the metacharacters; their meanings will be discussed
7777
in the rest of this HOWTO. ::
7878

79-
. ^ $ * + ? { [ ] \ | ( )
79+
. ^ $ * + ? { } [ ] \ | ( )
8080

8181
The first metacharacters we'll look at are ``[`` and ``]``. They're used for
8282
specifying a character class, which is a set of characters that you wish to

Doc/library/asyncore.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ implement its socket handling::
282282
asyncore.dispatcher.__init__(self)
283283
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
284284
self.connect( (host, 80) )
285-
self.buffer = bytes('GET %s HTTP/1.0\r\n\r\n' % path, 'ascii')
285+
self.buffer = bytes('GET %s HTTP/1.0\r\nHost: %s\r\n\r\n' %
286+
(path, host), 'ascii')
286287

287288
def handle_connect(self):
288289
pass

Doc/library/curses.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,9 @@ Several constants are available to specify character cell attributes:
11731173
+------------------+-------------------------------+
11741174
| ``A_NORMAL`` | Normal attribute. |
11751175
+------------------+-------------------------------+
1176+
| ``A_REVERSE`` | Reverse background and |
1177+
| | foreground colors. |
1178+
+------------------+-------------------------------+
11761179
| ``A_STANDOUT`` | Standout mode. |
11771180
+------------------+-------------------------------+
11781181
| ``A_UNDERLINE`` | Underline mode. |

Doc/library/locale.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The :mod:`locale` module defines the following exception and functions:
161161
.. data:: D_T_FMT
162162

163163
Get a string that can be used as a format string for :func:`strftime` to
164-
represent time and date in a locale-specific way.
164+
represent date and time in a locale-specific way.
165165

166166
.. data:: D_FMT
167167

@@ -246,12 +246,17 @@ The :mod:`locale` module defines the following exception and functions:
246246

247247
.. data:: ERA_D_T_FMT
248248

249-
Get a format string for :func:`strftime` to represent dates and times in a
249+
Get a format string for :func:`strftime` to represent date and time in a
250250
locale-specific era-based way.
251251

252252
.. data:: ERA_D_FMT
253253

254-
Get a format string for :func:`strftime` to represent time in a
254+
Get a format string for :func:`strftime` to represent a date in a
255+
locale-specific era-based way.
256+
257+
.. data:: ERA_T_FMT
258+
259+
Get a format string for :func:`strftime` to represent a time in a
255260
locale-specific era-based way.
256261

257262
.. data:: ALT_DIGITS

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,7 @@ copying. Memory is generally interpreted as simple bytes.
23112311
.. class:: memoryview(obj)
23122312

23132313
Create a :class:`memoryview` that references *obj*. *obj* must support the
2314-
buffer protocol. Builtin objects that support the buffer protocol include
2314+
buffer protocol. Built-in objects that support the buffer protocol include
23152315
:class:`bytes` and :class:`bytearray`.
23162316

23172317
A :class:`memoryview` has the notion of an *element*, which is the

Doc/library/turtle.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,9 +2306,11 @@ The demo scripts are:
23062306
| bytedesign | complex classical | :func:`tracer`, delay,|
23072307
| | turtle graphics pattern | :func:`update` |
23082308
+----------------+------------------------------+-----------------------+
2309-
| chaos | graphs verhust dynamics, | world coordinates |
2310-
| | proves that you must not | |
2311-
| | trust computers' computations| |
2309+
| chaos | graphs Verhulst dynamics, | world coordinates |
2310+
| | shows that computer's | |
2311+
| | computations can generate | |
2312+
| | results sometimes against the| |
2313+
| | common sense expectations | |
23122314
+----------------+------------------------------+-----------------------+
23132315
| clock | analog clock showing time | turtles as clock's |
23142316
| | of your computer | hands, ontimer |

Doc/reference/simple_stmts.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ square brackets, is recursively defined as follows.
119119
* If the target list is a comma-separated list of targets: The object must be an
120120
iterable with the same number of items as there are targets in the target list,
121121
and the items are assigned, from left to right, to the corresponding targets.
122-
(This rule is relaxed as of Python 1.5; in earlier versions, the object had to
123-
be a tuple. Since strings are sequences, an assignment like ``a, b = "xy"`` is
124-
now legal as long as the string has the right length.)
125122

126123
* If the target list contains one target prefixed with an asterisk, called a
127124
"starred" target: The object must be a sequence with at least as many items
@@ -991,10 +988,3 @@ pre-existing bindings in the local scope.
991988

992989
:pep:`3104` - Access to Names in Outer Scopes
993990
The specification for the :keyword:`nonlocal` statement.
994-
995-
996-
.. rubric:: Footnotes
997-
998-
.. [#] It may occur within an :keyword:`except` or :keyword:`else` clause. The
999-
restriction on occurring in the :keyword:`try` clause is implementor's
1000-
laziness and will eventually be lifted.

Doc/tutorial/inputoutput.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@ the :func:`print` function. (A third way is using the :meth:`write` method
1919
of file objects; the standard output file can be referenced as ``sys.stdout``.
2020
See the Library Reference for more information on this.)
2121

22-
.. index:: module: string
23-
2422
Often you'll want more control over the formatting of your output than simply
2523
printing space-separated values. There are two ways to format your output; the
2624
first way is to do all the string handling yourself; using string slicing and
2725
concatenation operations you can create any layout you can imagine. The
28-
standard module :mod:`string` contains some useful operations for padding
26+
string type has some methods that perform useful operations for padding
2927
strings to a given column width; these will be discussed shortly. The second
3028
way is to use the :meth:`str.format` method.
3129

32-
The :mod:`string` module contains a class Template which offers yet another way
33-
to substitute values into strings.
30+
The :mod:`string` module contains a :class:`~string.Template` class which offers
31+
yet another way to substitute values into strings.
3432

3533
One question remains, of course: how do you convert values to strings? Luckily,
3634
Python has ways to convert any value to a string: pass it to the :func:`repr`

0 commit comments

Comments
 (0)