Skip to content

Commit 7816b64

Browse files
Revert "Fix various typos and spelling errors found by codespell."
This reverts commit a93e9d6.
1 parent a93e9d6 commit 7816b64

File tree

265 files changed

+958
-958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+958
-958
lines changed

Doc/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ Available make targets are:
5959

6060
* "html", which builds standalone HTML files for offline viewing.
6161

62-
* "htmlview", which reuses the "html" builder, but then opens the main page
62+
* "htmlview", which re-uses the "html" builder, but then opens the main page
6363
in your default web browser.
6464

65-
* "htmllive", which reuses the "html" builder, rebuilds the docs,
65+
* "htmllive", which re-uses the "html" builder, rebuilds the docs,
6666
starts a local server, and automatically reloads the page in your browser
6767
when you make changes to reST files (Unix only).
6868

Doc/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ and initialize it by calling :c:func:`PyErr_NewException` in the module's
214214

215215
SpamError = PyErr_NewException("spam.error", NULL, NULL);
216216

217-
Since :c:data:`!SpamError` is a global variable, it will be overwritten every time
217+
Since :c:data:`!SpamError` is a global variable, it will be overwitten every time
218218
the module is reinitialized, when the :c:data:`Py_mod_exec` function is called.
219219

220220
For now, let's avoid the issue: we will block repeated initialization by raising an

Doc/howto/functional.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ have the form::
375375
if condition3
376376
...
377377
for exprN in sequenceN
378-
if condition )
378+
if conditionN )
379379

380380
Again, for a list comprehension only the outside brackets are different (square
381381
brackets instead of parentheses).
@@ -407,7 +407,7 @@ equivalent to the following Python code::
407407
continue # Skip this element
408408
...
409409
for exprN in sequenceN:
410-
if not (condition):
410+
if not (conditionN):
411411
continue # Skip this element
412412

413413
# Output the value of

Doc/howto/gdb_helpers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ enabled::
136136
at Objects/unicodeobject.c:551
137137
#7 0x0000000000440d94 in PyUnicodeUCS2_FromString (u=0x5c2b8d "__lltrace__") at Objects/unicodeobject.c:569
138138
#8 0x0000000000584abd in PyDict_GetItemString (v=
139-
{'Yuck': <type at remote 0xad4730>, '__builtins__': <module at remote 0x7ffff7fd5ee8>, '__file__': 'Lib/test/crashes/nasty_eq_vs_dict.py', '__package__': None, 'y': <Yuck(i=0) at remote 0xaacd80>, 'dict': {0: 0, 1: 1, 2: 2, 3: 3}, '__cached__': None, '__name__': '__main__', 'z': <Yuck(i=0) at remote 0xaace60>, '__doc__': None}, key=
139+
{'Yuck': <type at remote 0xad4730>, '__builtins__': <module at remote 0x7ffff7fd5ee8>, '__file__': 'Lib/test/crashers/nasty_eq_vs_dict.py', '__package__': None, 'y': <Yuck(i=0) at remote 0xaacd80>, 'dict': {0: 0, 1: 1, 2: 2, 3: 3}, '__cached__': None, '__name__': '__main__', 'z': <Yuck(i=0) at remote 0xaace60>, '__doc__': None}, key=
140140
0x5c2b8d "__lltrace__") at Objects/dictobject.c:2171
141141

142142
Notice how the dictionary argument to ``PyDict_GetItemString`` is displayed

Doc/includes/email-read-alternative.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def magic_html_parser(html_text, partfiles):
3636
print()
3737
print(''.join(simplest.get_content().splitlines(keepends=True)[:3]))
3838

39-
and = input("View full message?")
40-
if and.lower()[0] == 'n':
39+
ans = input("View full message?")
40+
if ans.lower()[0] == 'n':
4141
sys.exit()
4242

4343
# We can extract the richest alternative in order to display it:

Doc/library/bz2.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ Using :func:`compress` and :func:`decompress` to demonstrate round-trip compress
322322
>>> import bz2
323323
>>> data = b"""\
324324
... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue
325-
... nec ullamcorper. Name rutrum pretium placerat. Aliquam vel tristique lorem,
325+
... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem,
326326
... sit amet cursus ante. In interdum laoreet mi, sit amet ultrices purus
327-
... pulvinar a. Name gravida euismod magna, non various justo tincidunt feugiat.
327+
... pulvinar a. Nam gravida euismod magna, non varius justo tincidunt feugiat.
328328
... Aliquam pharetra lacus non risus vehicula rutrum. Maecenas aliquam leo
329329
... felis. Pellentesque semper nunc sit amet nibh ullamcorper, ac elementum
330330
... dolor luctus. Curabitur lacinia mi ornare consectetur vestibulum."""
@@ -362,9 +362,9 @@ Writing and reading a bzip2-compressed file in binary mode:
362362
>>> import bz2
363363
>>> data = b"""\
364364
... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue
365-
... nec ullamcorper. Name rutrum pretium placerat. Aliquam vel tristique lorem,
365+
... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem,
366366
... sit amet cursus ante. In interdum laoreet mi, sit amet ultrices purus
367-
... pulvinar a. Name gravida euismod magna, non various justo tincidunt feugiat.
367+
... pulvinar a. Nam gravida euismod magna, non varius justo tincidunt feugiat.
368368
... Aliquam pharetra lacus non risus vehicula rutrum. Maecenas aliquam leo
369369
... felis. Pellentesque semper nunc sit amet nibh ullamcorper, ac elementum
370370
... dolor luctus. Curabitur lacinia mi ornare consectetur vestibulum."""

Doc/library/collections.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ or subtracting from an empty counter.
455455
Returns a new deque object initialized left-to-right (using :meth:`append`) with
456456
data from *iterable*. If *iterable* is not specified, the new deque is empty.
457457

458-
Dequeues are a generalization of stacks and queues (the name is pronounced "deck"
459-
and is short for "double-ended queue"). Dequeues support thread-safe, memory
458+
Deques are a generalization of stacks and queues (the name is pronounced "deck"
459+
and is short for "double-ended queue"). Deques support thread-safe, memory
460460
efficient appends and pops from either side of the deque with approximately the
461461
same *O*\ (1) performance in either direction.
462462

@@ -466,11 +466,11 @@ or subtracting from an empty counter.
466466
position of the underlying data representation.
467467

468468

469-
If *maxlen* is not specified or is ``None``, dequeues may grow to an
469+
If *maxlen* is not specified or is ``None``, deques may grow to an
470470
arbitrary length. Otherwise, the deque is bounded to the specified maximum
471471
length. Once a bounded length deque is full, when new items are added, a
472472
corresponding number of items are discarded from the opposite end. Bounded
473-
length dequeues provide functionality similar to the ``tail`` filter in
473+
length deques provide functionality similar to the ``tail`` filter in
474474
Unix. They are also useful for tracking transactions and other pools of data
475475
where only the most recent activity is of interest.
476476

@@ -582,13 +582,13 @@ or subtracting from an empty counter.
582582
.. versionadded:: 3.1
583583

584584

585-
In addition to the above, dequeues support iteration, pickling, ``len(d)``,
585+
In addition to the above, deques support iteration, pickling, ``len(d)``,
586586
``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing with
587587
the :keyword:`in` operator, and subscript references such as ``d[0]`` to access
588588
the first element. Indexed access is *O*\ (1) at both ends but slows to *O*\ (*n*) in
589589
the middle. For fast random access, use lists instead.
590590

591-
Starting in version 3.5, dequeues support ``__add__()``, ``__mul__()``,
591+
Starting in version 3.5, deques support ``__add__()``, ``__mul__()``,
592592
and ``__imul__()``.
593593

594594
Example:
@@ -650,17 +650,17 @@ Example:
650650
:class:`deque` Recipes
651651
^^^^^^^^^^^^^^^^^^^^^^
652652

653-
This section shows various approaches to working with dequeues.
653+
This section shows various approaches to working with deques.
654654

655-
Bounded length dequeues provide functionality similar to the ``tail`` filter
655+
Bounded length deques provide functionality similar to the ``tail`` filter
656656
in Unix::
657657

658658
def tail(filename, n=10):
659659
'Return the last n lines of a file'
660660
with open(filename) as f:
661661
return deque(f, n)
662662

663-
Another approach to using dequeues is to maintain a sequence of recently
663+
Another approach to using deques is to maintain a sequence of recently
664664
added elements by appending to the right and popping to the left::
665665

666666
def moving_average(iterable, n=3):

Doc/library/datetime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,8 +2515,8 @@ requires, and these work on all platforms with a standard C implementation.
25152515
+-----------+--------------------------------+------------------------+-------+
25162516
| ``%B`` | Month as locale's full name. || January, February, | \(1) |
25172517
| | | ..., December (en_US);| |
2518-
| | || January, February, ..., | |
2519-
| | | December (de_DE) | |
2518+
| | || Januar, Februar, ..., | |
2519+
| | | Dezember (de_DE) | |
25202520
+-----------+--------------------------------+------------------------+-------+
25212521
| ``%m`` | Month as a zero-padded | 01, 02, ..., 12 | \(9) |
25222522
| | decimal number. | | |

Doc/library/difflib.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
246246
>>> print(''.join(diff), end="")
247247
- one
248248
? ^
249-
+ or
249+
+ ore
250250
? ^
251251
- two
252252
- three
@@ -273,7 +273,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
273273
two
274274
three
275275
>>> print(''.join(restore(diff, 2)), end="")
276-
or
276+
ore
277277
tree
278278
emu
279279

@@ -420,12 +420,12 @@ The :class:`SequenceMatcher` class has this constructor:
420420
is not changed.
421421

422422

423-
.. method:: find_longest_match(also=0, ahi=None, blo=0, bhi=None)
423+
.. method:: find_longest_match(alo=0, ahi=None, blo=0, bhi=None)
424424

425-
Find longest matching block in ``a[also:ahi]`` and ``b[blo:bhi]``.
425+
Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``.
426426

427427
If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns
428-
``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``also
428+
``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo
429429
<= i <= i+k <= ahi`` and ``blo <= j <= j+k <= bhi``. For all ``(i', j',
430430
k')`` meeting those conditions, the additional conditions ``k >= k'``, ``i
431431
<= i'``, and if ``i == i'``, ``j <= j'`` are also met. In other words, of
@@ -453,7 +453,7 @@ The :class:`SequenceMatcher` class has this constructor:
453453
>>> s.find_longest_match(0, 5, 0, 9)
454454
Match(a=1, b=0, size=4)
455455

456-
If no blocks match, this returns ``(also, blo, 0)``.
456+
If no blocks match, this returns ``(alo, blo, 0)``.
457457

458458
This method returns a :term:`named tuple` ``Match(a, b, size)``.
459459

Doc/library/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ the `Python Package Index <https://pypi.org>`_.
5454
archiving.rst
5555
fileformats.rst
5656
crypto.rst
57-
allows.rst
57+
allos.rst
5858
cmdlinelibs.rst
5959
concurrency.rst
6060
ipc.rst

0 commit comments

Comments
 (0)