Skip to content

Commit e54097d

Browse files
minho42Mariatta
authored andcommitted
Fix typos in various PEPs (python#1111)
1 parent f9cecb6 commit e54097d

Some content is hidden

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

50 files changed

+69
-69
lines changed

Diff for: pep-0200.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Open items -- completed/fixed
265265
Deal with buffering problem with SocketServer
266266

267267
[04-Sep-2000 tim: done; installer runs; w9xpopen not an issue]
268-
[01-Sep-2000 tim: make a prerelease availabe]
268+
[01-Sep-2000 tim: make a prerelease available]
269269
Windows ME: Don't know anything about it. Will the installer
270270
even run? Does it need the w9xpopen hack?
271271

Diff for: pep-0228.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Now, there is two thing the models promises for the field operations
8484
- All field rules are true, except that for not-``isexact()`` numbers,
8585
they might be only approximately true.
8686

87-
One consequence of these two rules is that all exact calcutions
87+
One consequence of these two rules is that all exact calculations
8888
are done as (complex) rationals: since the field laws must hold,
8989
then ::
9090

Diff for: pep-0231.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ to be no good solution here.
633633

634634
It's also dubious how useful it is to support ``__findattr__`` both
635635
for getting and for setting attributes -- ``__setattr__`` gets called
636-
in all cases alrady.
636+
in all cases already.
637637

638638
The examples can all be implemented using ``__getattr__`` if care is
639639
taken not to store instance variables under their own names.

Diff for: pep-0243.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ will consist of the following fields:
5555
- ``pkginfo`` (optional) -- The file containing the distribution
5656
meta-data (as specified in PEP 241 [1]_). Note that if this is
5757
not included, the distribution file is expected to be in ``.tar``
58-
format (gzipped and bzipped compreesed are allowed) or ``.zip``
58+
format (gzipped and bzipped compressed are allowed) or ``.zip``
5959
format, with a ``PKG-INFO`` file in the top-level directory it
6060
extracts (``package-1.00/PKG-INFO``).
6161

Diff for: pep-0294.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type names are available to be consistently used to refer to the type
5959
object.
6060

6161
Most types are accessible as either builtins or in the new module but
62-
some types such as traceback and generator are only accssible through
62+
some types such as traceback and generator are only accessible through
6363
the types module under names which do not match the type name. This
6464
PEP provides a uniform way to access all basic types under a single
6565
set of names.

Diff for: pep-0298.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ These functions aren't supposed to be called directly, they are
131131
called through convenience functions declared in
132132
Include/abstract.h::
133133

134-
int PyObject_AquireLockedReadBuffer(PyObject *obj,
134+
int PyObject_AcquireLockedReadBuffer(PyObject *obj,
135135
const void **buffer,
136136
size_t *buffer_len);
137137

Diff for: pep-0308.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ After unprecedented community response (very good arguments were
102102
made both pro and con) this PEP has been revised with the help of
103103
Raymond Hettinger. Without going through a complete revision
104104
history, the main changes are a different proposed syntax, an
105-
overview of proposed alternatives, the state of the curent
105+
overview of proposed alternatives, the state of the current
106106
discussion, and a discussion of short-circuit behavior.
107107

108108
Following the discussion, a vote was held. While there was an overall

Diff for: pep-0323.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Adding ``__copy__`` methods to existing iterators will change the
3636
behavior under ``tee()``. Currently, the copied iterators remain
3737
tied to the original iterator. If the original advances, then
3838
so do all of the copies. Good practice is to overwrite the
39-
original so that anamolies don't result: ``a,b=tee(a)``.
39+
original so that anomalies don't result: ``a,b=tee(a)``.
4040
Code that doesn't follow that practice may observe a semantic
4141
change if a ``__copy__`` method is added to an iterator.
4242

Diff for: pep-0327.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ API for Py2.4. Several ideas contributed to the thought process:
569569

570570
- While theoretically nice, real world use cases for interactions between floats
571571
and decimals are lacking. Java included float/decimal conversions to handle
572-
an obscure case where calculations are best performed in decimal eventhough
572+
an obscure case where calculations are best performed in decimal even though
573573
a legacy data structure requires the inputs and outputs to be stored in
574574
binary floating point.
575575

Diff for: pep-0370.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ variable for distutils.
137137
The user site directory is added before the system site directories
138138
but after Python's search paths and ``PYTHONPATH``. This setup allows
139139
the user to install a different version of a package than the system
140-
administrator but it prevents the user from accidently overwriting a
140+
administrator but it prevents the user from accidentally overwriting a
141141
stdlib module. Stdlib modules can still be overwritten with
142142
``PYTHONPATH``.
143143

Diff for: pep-0397.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ ability is nonetheless considered worthwhile.
157157

158158
On Unix, the user can control which specific version of Python is used
159159
by adjusting the links in /usr/bin to point to the desired version. As
160-
the launcher on Windows will not use Windows links, cutomization options
160+
the launcher on Windows will not use Windows links, customization options
161161
(exposed via both environment variables and INI files) will be used to
162162
override the semantics for determining what version of Python will be
163163
used. For example, while a shebang line of "/usr/bin/python2" will

Diff for: pep-0403.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ the heavy lifting:
179179
* comprehensions, generator expressions, map(), filter()
180180
* key arguments to sorted(), min(), max()
181181
* partial function application
182-
* provision of callbacks (e.g. for weak references or aysnchronous IO)
182+
* provision of callbacks (e.g. for weak references or asynchronous IO)
183183
* array broadcast operations in NumPy
184184

185185
However, adopting Ruby's block syntax directly won't work for Python, since

Diff for: pep-0410.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ mailbox with the mailbox module, etc.
5252
An arbitrary resolution is preferred over a fixed resolution (like nanosecond)
5353
to not have to change the API when a better resolution is required. For
5454
example, the NTP protocol uses fractions of 2\ :sup:`32` seconds
55-
(approximatively 2.3 × 10\ :sup:`-10` second), whereas the NTP protocol version
55+
(approximately 2.3 × 10\ :sup:`-10` second), whereas the NTP protocol version
5656
4 uses fractions of 2\ :sup:`64` seconds (5.4 × 10\ :sup:`-20` second).
5757

5858
.. note::

Diff for: pep-0431.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ New collections
277277
^^^^^^^^^^^^^^^
278278

279279
* ``all_timezones`` is the exhaustive list of the time zone names that can
280-
be used, listed alphabethically.
280+
be used, listed alphabetically.
281281

282282
* ``common_timezones`` is a list of useful, current time zones, listed
283-
alphabethically.
283+
alphabetically.
284284

285285

286286
The ``tzdata-update``-package

Diff for: pep-0433.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Add a new optional parameter *cloexec* on functions creating file
260260
descriptors. The default value of the *cloexec* parameter is ``False``,
261261
and this default cannot be changed. File descriptor inheritance enabled by
262262
default is also the default on POSIX and on Windows. This alternative is
263-
the most convervative option.
263+
the most conservative option.
264264

265265
This option does not solve issues listed in the `Rationale`_
266266
section, it only provides a helper to fix them. All functions creating
@@ -704,7 +704,7 @@ Python issues:
704704

705705
Other languages:
706706

707-
* Perl sets the close-on-exec flag on newly created file decriptor if
707+
* Perl sets the close-on-exec flag on newly created file descriptor if
708708
their number is greater than ``$SYSTEM_FD_MAX`` (``$^F``).
709709
See `$SYSTEM_FD_MAX documentation
710710
<http://perldoc.perl.org/perlvar.html#%24SYSTEM_FD_MAX>`_. Perl does

Diff for: pep-0444.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ that the middleware wraps may in fact be another middleware component
335335
wrapping another application, and so on, creating what is referred to
336336
as a "middleware stack".
337337

338-
A middleware must support asychronous execution if possible or fall
338+
A middleware must support asynchronous execution if possible or fall
339339
back to disabling itself.
340340

341341
Here a middleware that changes the ``HTTP_HOST`` key if an ``X-Host``
@@ -354,7 +354,7 @@ header exists and adds a comment to all html responses::
354354
if not hasattr(app_response, '__call__'):
355355
return filter_func(*app_response)
356356

357-
# asychronous response. filter when results are ready
357+
# asynchronous response. filter when results are ready
358358
def polling_function():
359359
rv = app_response()
360360
if rv is not None:

Diff for: pep-0458.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ TUF is designed to address these attacks, and others, by adding signed metadata
243243
referencing the metadata files during the update procedure. Repository files
244244
are verified against the information included in the metadata before they are
245245
handed off to the software update system. The framework also provides
246-
multi-signature trust, explicit and implicit revocation of cryptograhic keys,
246+
multi-signature trust, explicit and implicit revocation of cryptographic keys,
247247
responsibility separation of the metadata, and minimizes key risk. For a full
248248
list and outline of the repository attacks and software updater weaknesses
249249
addressed by TUF, see Appendix A.

Diff for: pep-0472.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Pros
401401

402402
Cons
403403
''''
404-
- Apparenty complex and wasteful;
404+
- Apparently complex and wasteful;
405405
- Degeneracy in notation (e.g. ``a[Z=3]`` and ``a[{"Z":3}]`` are equivalent and
406406
indistinguishable notations at the ``__[get|set|del]item__`` level).
407407
This behavior may or may not be acceptable.

Diff for: pep-0480.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ attacks, or metadata inconsistency attacks.
651651
+-------------------+-------------------+-----------------------+-----------------------+
652652
| snapshot | NO | NO | NO |
653653
| | timestamp and | timestamp needs to | timestamp needs to |
654-
| | targets or any of | coorperate | cooperate |
654+
| | targets or any of | cooperate | cooperate |
655655
| | the delegated | | |
656656
| | roles need to | | |
657657
| | cooperate | | |

Diff for: pep-0485.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ multiplication, comparisons, and subtraction. However, the implementation
117117
in the math module is written in C, and thus can not (easily) use python's
118118
duck typing. Rather, the values passed into the funciton will be converted
119119
to the float type before the calculation is performed. Passing in types
120-
(or values) that cannot be converted to floats will raise an appropirate
120+
(or values) that cannot be converted to floats will raise an appropriate
121121
Exception (TypeError, ValueError, or OverflowError).
122122

123123
The code will be tested to accommodate at least some values of these types:

Diff for: pep-0504.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ additional level of indirection)::
7878
def ensure_repeatable():
7979
"""Switch to using random.Random() for the module level APIs
8080

81-
This switches the default RNG instance from the crytographically
81+
This switches the default RNG instance from the cryptographically
8282
secure random.SystemRandom() to the deterministic random.Random(),
8383
enabling the seed(), getstate() and setstate() operations. This means
8484
a particular random scenario can be replayed later by providing the

Diff for: pep-0505/find-pep505.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class NoneCoalesceIfBlockVisitor(ast.NodeVisitor):
3838
... else:
3939
... self.b = c
4040
41-
...where `a` is a name and other characters represent any abitrary
41+
...where `a` is a name and other characters represent any arbitrary
4242
expression.
4343
4444
In the two latter forms, the search criterion is an assignment of `a`
@@ -144,7 +144,7 @@ class NoneCoalesceTernaryVisitor(ast.NodeVisitor):
144144
>>> a if a is not None else b
145145
>>> b if a is None else a
146146
147-
...where a is an identifier and b is an abitrary expression.
147+
...where a is an identifier and b is an arbitrary expression.
148148
'''
149149

150150
def __init__(self, file_, callback):
@@ -294,7 +294,7 @@ class SafeNavTernaryVisitor(ast.NodeVisitor):
294294
>>> a.foo if a is not None else b
295295
>>> b if a is None else a.foo
296296
297-
...where `a` is an identifier, `b` is an abitrary expression, and `foo` is
297+
...where `a` is an identifier, `b` is an arbitrary expression, and `foo` is
298298
an attribute, index, or function invocation.
299299
'''
300300

Diff for: pep-0510.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ PyPy has a ``cpyext`` module which emulates the Python C API but it has
7878
worse performances than CPython and does not support the full Python C
7979
API.
8080

81-
New features are first developped in CPython. In January 2016, the
81+
New features are first developed in CPython. In January 2016, the
8282
latest CPython stable version is 3.5, whereas PyPy only supports Python
8383
2.7 and 3.2, and Pyston only supports Python 2.7.
8484

Diff for: pep-0511.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ importlib hooks. If a feature becomes useful, it should be directly part
2424
of Python, instead of depending on an third party Python module.
2525

2626
Finally, this PEP was driven was the FAT Python optimization project
27-
which was abandonned in 2016, since it was not possible to show any
27+
which was abandoned in 2016, since it was not possible to show any
2828
significant speedup, but also because of the lack of time to implement
2929
the most advanced and complex optimizations.
3030

Diff for: pep-0514.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ The company name ``PyLauncher`` is reserved for the PEP 397 launcher
175175
(``py.exe``). It does not follow this convention and should be ignored by tools.
176176

177177
If a string value named ``DisplayName`` exists, it should be used to identify
178-
the environment manufacturer/developer/destributor to users. Otherwise, the name
178+
the environment manufacturer/developer/distributor to users. Otherwise, the name
179179
of the key should be used. (For ``PythonCore``, the default display name is
180180
"Python Software Foundation".)
181181

Diff for: pep-0519.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The addition of ``os.fspath()``, the updates to
189189
``pathlib.PurePath`` provide the semantics necessary to
190190
get the path representation one prefers. For a path object,
191191
``pathlib.PurePath``/``Path`` can be used. To obtain the ``str`` or
192-
``bytes`` representation without any coersion, then ``os.fspath()``
192+
``bytes`` representation without any coercion, then ``os.fspath()``
193193
can be used. If a ``str`` is desired and the encoding of ``bytes``
194194
should be assumed to be the default file system encoding, then
195195
``os.fsdecode()`` should be used. If a ``bytes`` representation is

Diff for: pep-0524.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ Proposition
409409
<https://www.python.org/dev/peps/pep-0522/>`_.
410410

411411
Python should not decide for the developer how to handle `The bug`_:
412-
raising immediatly a ``BlockingIOError`` if ``os.urandom()`` is going to
412+
raising immediately a ``BlockingIOError`` if ``os.urandom()`` is going to
413413
block allows developers to choose how to handle this case:
414414

415415
* catch the exception and falls back to a non-secure entropy source:

Diff for: pep-0527.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ File Extensions
159159
Currently ``sdist`` supports a wide variety of file extensions like ``.tar.gz``,
160160
``.tar``, ``.tar.bz2``, ``.tar.xz``, ``.zip``, ``.tar.Z``, ``.tgz``, and
161161
``.tbz``. However, of those the only extensions which get anything more than
162-
negligable usage is ``.tar.gz`` with 444,338 sdists currently, ``.zip`` with
162+
negligible usage is ``.tar.gz`` with 444,338 sdists currently, ``.zip`` with
163163
58,774 sdists currently, and ``.tar.bz2`` with 3,265 sdists currently.
164164

165165
Having multiple formats accepted requires tooling both within PyPI and outside

Diff for: pep-0533.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ idiom (``with`` block + ``for`` loop) and merging them together into a
170170
fancier ``for``. This may seem non-orthogonal, but makes sense when
171171
you consider that the existence of generators means that ``with``
172172
blocks actually depend on iterator cleanup to work reliably, plus
173-
experience showing that iterator cleanup is often a desireable feature
173+
experience showing that iterator cleanup is often a desirable feature
174174
in its own right.
175175

176176

Diff for: pep-0549.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Our implementation faces two challenges:
100100
be passed in as a "self" argument to all module-level functions.
101101

102102
Both challenges can be solved with the same approach: we define a new
103-
"fast subclass" flag that means "This object is a desciptor, and it
103+
"fast subclass" flag that means "This object is a descriptor, and it
104104
should be honored directly when this object is looked up as an
105105
attribute of an instance". So far this flag is only set on two
106106
types: ``property`` and ``collections.abc.InstanceDescriptor``.

Diff for: pep-0554.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ Resetting __main__
11091109
As proposed, every call to ``Interpreter.run()`` will execute in the
11101110
namespace of the interpreter's existing ``__main__`` module. This means
11111111
that data persists there between ``run()`` calls. Sometimes this isn't
1112-
desireable and you want to execute in a fresh ``__main__``. Also,
1112+
desirable and you want to execute in a fresh ``__main__``. Also,
11131113
you don't necessarily want to leak objects there that you aren't using
11141114
any more.
11151115

@@ -1224,7 +1224,7 @@ Buffering
12241224
---------
12251225

12261226
The proposed channels are unbuffered. This simplifies the API and
1227-
implementation. If buffering is desireable we can add it later.
1227+
implementation. If buffering is desirable we can add it later.
12281228

12291229
Return a lock from send()
12301230
-------------------------
@@ -1351,7 +1351,7 @@ Rejected possible solutions:
13511351
* return the exception (or its proxy) from ``run()`` instead of
13521352
raising it
13531353
* return a result object (like ``subprocess`` does) [result-object]_
1354-
(unecessary complexity?)
1354+
(unnecessary complexity?)
13551355
* throw the exception away and expect users to deal with unhandled
13561356
exceptions explicitly in the script they pass to ``run()``
13571357
(they can pass error info out via channels); with threads you have

Diff for: pep-0556.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,13 @@ and live inside the ``gc`` module, unless otherwise noted:
268268
"""
269269
Allocate a GC-enabled object.
270270
"""
271-
# Update allocation statistics (same code as currently, omitted for brievity)
271+
# Update allocation statistics (same code as currently, omitted for brevity)
272272
if is_implicit_gc_desired():
273273
if gc_is_threaded:
274274
schedule_gc_request()
275275
else:
276276
lock_and_collect()
277-
# Go ahead with allocation (same code as currently, omitted for brievity)
277+
# Go ahead with allocation (same code as currently, omitted for brevity)
278278
279279
280280
def gc_thread(interp_state):

Diff for: pep-0573.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This fixes one of the remaining roadblocks for adoption of PEP 3121 (Extension
3030
module initialization and finalization) and PEP 489
3131
(Multi-phase extension module initialization).
3232

33-
Additionaly, support for easier creation of immutable exception classes is added.
33+
Additionally, support for easier creation of immutable exception classes is added.
3434
This removes the need for keeping per-module state if it would only be used
3535
for exception classes.
3636

@@ -117,7 +117,7 @@ get the type object corresponding to the appropriate module.
117117
In short, heap types are "viral" – anything that “touches” them must itself be
118118
a heap type.
119119

120-
Curently, most exception types, apart from the ones in ``builtins``, are
120+
Currently, most exception types, apart from the ones in ``builtins``, are
121121
heap types. This is likely simply because there is a convenient way
122122
to create them: ``PyErr_NewException``.
123123
Heap types generally have a mutable ``__dict__``.

Diff for: pep-0575.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ An important consequence is that such functions by default
477477
do not become methods when used as attribute
478478
(``base_function.__get__`` only does that if ``m_self`` was ``NULL``).
479479
One could consider this a bug, but this was done for backwards compatibility reasons:
480-
in an initial post on python-ideas [#proposal]_ the concensus was to keep this
480+
in an initial post on python-ideas [#proposal]_ the consensus was to keep this
481481
misfeature of built-in functions.
482482

483483
However, to allow this anyway for specific or newly implemented

Diff for: pep-0576.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A small improvement in the performance of existing code is expected.
2323
Motivation
2424
==========
2525

26-
Currently third-party module authors face a dilemna when implementing
26+
Currently third-party module authors face a dilemma when implementing
2727
functions in C. Either they can use one of the pre-existing built-in function
2828
or method classes or implement their own custom class in C.
2929
The first choice causes them to lose the ability to access the internals of the callable object.

0 commit comments

Comments
 (0)