Issue #26916: Fixed words duplications.

This commit is contained in:
Serhiy Storchaka 2016-05-03 12:03:16 +03:00
parent 5999b23389
commit 3dad438872
48 changed files with 58 additions and 58 deletions

View File

@ -258,7 +258,7 @@ How to Make A Release
___ Add a new whatsnew/3.x.rst file (with the comment near the top
and the toplevel sections copied from the previous file) and
and add it to the toctree in whatsnew/index.rst.
add it to the toctree in whatsnew/index.rst.
___ Update the version number in configure.ac and re-run autoconf.

View File

@ -364,7 +364,7 @@ Appendix -- Dianne Hackborn's vref proposal (1995)
An example vref module using this model could include the
function "new"; When used as 'MyVref = vref.new(MyObject)', it
returns a new vref object such that that MyVref.object ==
returns a new vref object such that MyVref.object ==
MyObject. MyVref.object would then change to Nothing if
MyObject is ever deallocated.

View File

@ -83,7 +83,7 @@ Specification
style operations if the number indicates the availability of these.
A new style number is considered by the interpreter as such if and
only it it sets the type flag Py_TPFLAGS_CHECKTYPES. The main
only if it sets the type flag Py_TPFLAGS_CHECKTYPES. The main
difference between an old style number and a new style one is that the
numeric slot functions can no longer assume to be passed arguments of
identical type. New style slots must check all arguments for proper

View File

@ -140,7 +140,7 @@ Incompatibilities
inclusive) are "interned" -- whenever a result has such a value,
an existing short int with the same value is returned. This is
not done for long ints with the same values. This difference
will remain. (Since there is no guarantee of this interning, is
will remain. (Since there is no guarantee of this interning, it
is debatable whether this is a semantic difference -- but code
may exist that uses 'is' for comparisons of short ints and
happens to work because of this interning. Such code may fail
@ -291,7 +291,7 @@ OverflowWarning
Example
If you pass a long int to a C function or built-in operation that
takes an integer, it will be treated the same as as a short int as
takes an integer, it will be treated the same as a short int as
long as the value fits (by virtue of how PyArg_ParseTuple() is
implemented). If the long value doesn't fit, it will still raise
an OverflowError. For example:

View File

@ -199,7 +199,7 @@ Making a type a factory for its instances
callable. Since type objects are instances of their metatype
(PyType_Type), the metatype's tp_call slot (PyType_Type.tp_call)
points to a function that is invoked when any type object is
called. Now, since each type has do do something different to
called. Now, since each type has to do something different to
create an instance of itself, PyType_Type.tp_call immediately
defers to the tp_new slot of the type that is being called.
PyType_Type itself is also callable: its tp_new slot creates a new
@ -271,7 +271,7 @@ Making a type a factory for its instances
tp_new() is the type that defined the tp_new() function (in the
example, if type == &PyInt_Type), and when the tp_init() slot for
this type does nothing. If the type argument differs, the
tp_new() call is initiated by by a derived type's tp_new() to
tp_new() call is initiated by a derived type's tp_new() to
create the object and initialize the base type portion of the
object; in this case tp_new() should always return a new object
(or raise an exception).

View File

@ -73,7 +73,7 @@ Database Contents
A distribution that uses the Distutils for installation should
automatically update the database. Distributions that roll their
own installation will have to use the database's API to to
own installation will have to use the database's API to
manually add or update their own entry. System package managers
such as RPM or pkgadd can just create the new file in the
INSTALLDB directory.

View File

@ -252,7 +252,7 @@ YODL, AFT, ...) which are not mentioned.
- SText implementations have been buggy.
- Most STexts have have had no formal specification except for the
- Most STexts have no formal specification except for the
implementation itself. A buggy implementation meant a buggy spec,
and vice-versa.

View File

@ -179,7 +179,7 @@ containing the source file is not writable by the current user a
performance penalty is incurred each time a program importing the
module is run. [3]_ Warning messages may also be generated in certain
circumstances. If the directory is writable, nearly simultaneous
attempts attempts to write the bytecode file by two separate processes
attempts to write the bytecode file by two separate processes
may occur, resulting in file corruption. [4]_
In environments with RAM disks available, it may be desirable for

View File

@ -244,7 +244,7 @@ used as a sentinel value for maximum values "in the wild", even though
None itself compares smaller than any other object in the standard
distribution.
As an aside, it is not clear to to the author that using Nodes as a
As an aside, it is not clear to the author that using Nodes as a
replacement for tuples has increased readability significantly, if at
all.

View File

@ -112,7 +112,7 @@ Rationale
To keep things simpler, the C API calls for setting an exception
will not automatically set the exception's '__context__'. Guido
van Rossum has has expressed concerns with making such changes [8].
van Rossum has expressed concerns with making such changes [8].
As for other languages, Java and Ruby both discard the original
exception when another exception occurs in a 'catch'/'rescue' or

View File

@ -67,7 +67,7 @@ Motivation
Currently, Python has a large number of different functions
scattered over half a dozen modules for handling paths. This
makes it hard for newbies and experienced developers to to choose
makes it hard for newbies and experienced developers to choose
the right method.
The Path class provides the following enhancements over the

View File

@ -495,7 +495,7 @@ The patches could be created with
``git diff master > stuff-i-did.patch``, too, but
``git format-patch | git am`` knows some tricks
(empty files, renames, etc) that ordinary patch can't handle. git
grabs "Stuff I did" out of the the commit message to create the file
grabs "Stuff I did" out of the commit message to create the file
name 0001-Stuff-I-did.patch. See Patch Review below for a
description of the git-format-patch format.
::
@ -1322,7 +1322,7 @@ is likely to shock a veteran CVS user.
Tests/Impressions
=================
As I (Brett Cannon) am left with the task of of making the final
As I (Brett Cannon) am left with the task of making the final
decision of which/any DVCS to go with and not my co-authors, I felt
it only fair to write down what tests I ran and my impressions as I
evaluate the various tools so as to be as transparent as possible.

View File

@ -240,7 +240,7 @@ From the doc::
Finally, to handle miscellaneous cases, the strings "pre", "preview", and
"rc" are treated as if they were "c", i.e. as though they were release
candidates, and therefore are not as new as a version string that does not
contain them, and "dev" is replaced with an '@' so that it sorts lower than
contain them, and "dev" is replaced with an '@' so that it sorts lower
than any other pre-release tag.
In other words, ``parse_version`` will return a tuple for each version string,

View File

@ -212,7 +212,7 @@ have that extra condition marker.
Compatiblity
============
This change is is based on a new metadata ``1.2`` format meaning that
This change is based on a new metadata ``1.2`` format meaning that
Distutils will be able to distinguish old PKG-INFO files from new ones.
The ``setup.cfg`` file change will stay ``ConfigParser``-compatible and

View File

@ -103,7 +103,7 @@ regard to ``sys.exec_prefix``. (``sys.exec_prefix`` is the equivalent of
same value as ``sys.prefix``.)
The ``site`` and ``sysconfig`` standard-library modules are modified
such that the standard library and header files are are found relative
such that the standard library and header files are found relative
to ``sys.base_prefix`` / ``sys.base_exec_prefix``, while site-package
directories ("purelib" and "platlib", in ``sysconfig`` terms) are still
found relative to ``sys.prefix`` / ``sys.exec_prefix``.

View File

@ -83,7 +83,7 @@ In any case, modules that are proposed to be added to the standard library,
whether via ``__preview__`` or directly, must fulfill the acceptance conditions
set by PEP 2.
It is important to stress that the aim of of this proposal is not to make the
It is important to stress that the aim of this proposal is not to make the
process of adding new modules to the standard library more difficult. On the
contrary, it tries to provide a means to add *more* useful libraries. Modules
which are obvious candidates for entry can be added as before. Modules which
@ -118,7 +118,7 @@ API for the problem it intends to solve. The module can then be added to the
from __preview__ import example
Assuming the module is then promoted to the the standard library proper in
Assuming the module is then promoted to the standard library proper in
release ``3.X+1``, it will be moved to a permanent location in the library::
import example

View File

@ -23,7 +23,7 @@ feature release. A provisional package may have its API modified prior to
"graduating" into a "stable" state. On one hand, this state provides the
package with the benefits of being formally part of the Python distribution.
On the other hand, the core development team explicitly states that no promises
are made with regards to the the stability of the package's API, which may
are made with regards to the stability of the package's API, which may
change for the next release. While it is considered an unlikely outcome,
such packages may even be removed from the standard library without a
deprecation period if the concerns regarding their API or maintenance prove

View File

@ -100,7 +100,7 @@ Implementation
Recipe: hashable dict
======================
To ensure that a a frozendict is hashable, values can be checked
To ensure that a frozendict is hashable, values can be checked
before creating the frozendict::
import itertools

View File

@ -652,7 +652,7 @@ On Linux older than 2.6.27, if the ``SOCK_CLOEXEC`` flag is set in the
socket type, ``socket()`` or ``socketpair()`` fail and ``errno`` is set
to ``EINVAL``.
On Windows XPS3, ``WSASocket()`` with with ``WSAEPROTOTYPE`` when
On Windows XPS3, ``WSASocket()`` with ``WSAEPROTOTYPE`` when
``WSA_FLAG_NO_HANDLE_INHERIT`` flag is used.
New functions:

View File

@ -315,7 +315,7 @@ a *return converter*.
Parameter Declaration
---------------------
The full form of the parameter declaration line as as follows::
The full form of the parameter declaration line as follows::
name: converter [ (parameter=value [, parameter2=value2]) ] [ = default]

View File

@ -132,7 +132,7 @@ Public or Private Mirrors
=========================
The mirroring protocol will continue to exist as defined in `PEP381`_ and
people are encouraged to to host public and private mirrors if they so desire.
people are encouraged to host public and private mirrors if they so desire.
The recommended mirroring client is `Bandersnatch`_.

View File

@ -86,7 +86,7 @@ Specification
of the hash algorithm in bytes. The block size is used by the
HMAC module to pad the secret key to digest_size or to hash the
secret key if it is longer than digest_size. If no HMAC
algorithm is standardized for the the hash algorithm, return
algorithm is standardized for the hash algorithm, return
``NotImplemented`` instead.
name

View File

@ -202,7 +202,7 @@ Functions
store more frames.
The ``tracemalloc`` module must be tracing memory allocations to
take a snapshot, see the the ``start()`` function.
take a snapshot, see the ``start()`` function.
See also the ``get_object_traceback()`` function.

View File

@ -88,7 +88,7 @@ is mapped to ``-2``.
Current implementation with modified FNV
========================================
CPython currently uses uses a variant of the Fowler-Noll-Vo hash function
CPython currently uses a variant of the Fowler-Noll-Vo hash function
[fnv]_. The variant is has been modified to reduce the amount and cost of hash
collisions for common strings. The first character of the string is added
twice, the first time with a bit shift of 7. The length of the input
@ -595,7 +595,7 @@ the past, but are not subject of this PEP.
3. Hash maps have a worst case of O(n) for insertion and lookup of keys. This
results in a quadratic runtime during a hash collision attack. The
introduction of a new and additional data structure with with O(log n)
introduction of a new and additional data structure with O(log n)
worst case behavior would eliminate the root cause. A data structures like
red-black-tree or prefix trees (trie [trie]_) would have other benefits,
too. Prefix trees with stringed keyed can reduce memory usage as common

View File

@ -1082,7 +1082,7 @@ Roger Dingledine, Sebastian Hahn, Nick Mathewson, Martin Peck and Justin Samuel
helped us to design TUF from its predecessor Thandy of the Tor project.
We appreciate the efforts of Konstantin Andrianov, Geremy Condra, Zane Fisher,
Justin Samuel, Tian Tian, Santiago Torres, John Ward, and Yuyu Zheng to to
Justin Samuel, Tian Tian, Santiago Torres, John Ward, and Yuyu Zheng to
develop TUF.
Vladimir Diaz, Monzur Muhammad and Sai Teja Peddinti helped us to review this

View File

@ -111,7 +111,7 @@ Criticisms
* In 3.3 encoding to ASCII or latin-1 is as fast as memcpy (but it still
creates a separate object).
* Developers will have to work around the lack of binary formatting anyway,
if they want to to support Python 3.4 and earlier.
if they want to support Python 3.4 and earlier.
* bytes.join() is consistently faster than format to join bytes strings
(XXX *is it?*).
* Formatting functions could be implemented in a third party module,

View File

@ -637,7 +637,7 @@ colon in the proposal much more obvious::
`Tcl`__ has the other half of Lua's xpcall; catch is a function which returns
true if an exception was caught, false otherwise, and you get the value out
in other ways. And it's all built around the the implicit quote-and-exec
in other ways. And it's all built around the implicit quote-and-exec
that everything in Tcl is based on, making it even harder to describe in
Python terms than Lisp macros, but something like

View File

@ -208,7 +208,7 @@ numeric operators also apply in an elementwise manner to arrays; the
reverse convention would lead to more special cases.)
So that's why matrix multiplication doesn't and can't just use ``*``.
Now, in the the rest of this section, we'll explain why it nonetheless
Now, in the rest of this section, we'll explain why it nonetheless
meets the high bar for adding a new operator.
@ -1195,7 +1195,7 @@ References
test the null hypothesis that :math:`H\beta = r`; a large :math:`S`
then indicates that this hypothesis is unlikely to be true. For
example, in an analysis of human height, the vector :math:`\beta`
might contain one value which was the the average height of the
might contain one value which was the average height of the
measured men, and another value which was the average height of the
measured women, and then setting :math:`H = [1, -1], r = 0` would
let us test whether men and women are the same height on

View File

@ -136,7 +136,7 @@ Besides, some signals are not interesting and should not disrupt the
application. There are two options to interrupt an application on
only *some* signals:
* Set up a custom signal signal handler which raises an exception, such as
* Set up a custom signal handler which raises an exception, such as
``KeyboardInterrupt`` for ``SIGINT``.
* Use a I/O multiplexing function like ``select()`` together with Python's
signal wakeup file descriptor: see the function ``signal.set_wakeup_fd()``.

View File

@ -1414,7 +1414,7 @@ Convenience definitions:
``NamedTuple(type_name, [(field_name, field_type), ...])``
and equivalent to
``collections.namedtuple(type_name, [field_name, ...])``.
This is useful to declare the types of the fields of a a named tuple
This is useful to declare the types of the fields of a named tuple
type.
* cast(), described earlier

View File

@ -57,7 +57,7 @@ virtualenv::
pip install pytest
py.test
Having to use different commands is is error-prone, and in many cases
Having to use different commands is error-prone, and in many cases
the error is difficult to spot immediately. The PEP proposes making
the ``py`` command usable with virtual environments, so that the first
form of command can be used in all cases.

View File

@ -296,7 +296,7 @@ For example, this code::
f'abc{expr1:spec1}{expr2!r:spec2}def{expr3}ghi'
Might be be evaluated as::
Might be evaluated as::
'abc' + format(expr1, spec1) + format(repr(expr2), spec2) + 'def' + format(expr3) + 'ghi'

View File

@ -302,7 +302,7 @@ from a SQL database and formats it as JSON to send to an HTTP client::
Both ``first_seen`` and ``last_seen`` are allowed to be ``null`` in the
database, and they are also allowed to be ``null`` in the JSON response. JSON
does not have a native way to represent a ``datetime``, so the the server's
does not have a native way to represent a ``datetime``, so the server's
contract states that any non-``null`` date is represented as a ISO-8601 string.
Note that this code is invalid by PEP-8 standards: several lines are over the
@ -925,7 +925,7 @@ as the ``None``-coalescing operator.
The ``None``-aware attribute access operator (also called "safe navigation")
checks its left operand. If the left operand is ``None``, then the operator
evaluates to ``None``. If the the left operand is not ``None``, then the
evaluates to ``None``. If the left operand is not ``None``, then the
operator accesses the attribute named by the right operand. As in the previous
section, we continue to use the temporary spelling ``💩``::

View File

@ -457,7 +457,7 @@ Prior Art
Method cache and type version tag
---------------------------------
In 2007, Armin Rigo wrote a patch to to implement a cache of methods. It
In 2007, Armin Rigo wrote a patch to implement a cache of methods. It
was merged into Python 2.6. The patch adds a "type attribute cache
version tag" (``tp_version_tag``) and a "valid version tag" flag to
types (the ``PyTypeObject`` structure).

View File

@ -348,7 +348,7 @@ have the same parameter defaults, the same keyword parameter defaults,
and must not have specialized code.
If *code* is a Python function or a code object, a new code object is
created and the code name and first number number of the code object of
created and the code name and first line number of the code object of
*func* are copied. The specialized code must have the same cell
variables and the same free variables.

View File

@ -100,7 +100,7 @@ specification is encoded in the source code and documentation of
to it as the ``setup.py``\-style.
Here we define a new ``pypackage.json``\-style source tree. This
consists of any any directory which contains a file named
consists of any directory which contains a file named
``pypackage.json``. (If a tree contains both ``pypackage.json`` and
``setup.py`` then it is a ``pypackage.json``\-style source tree, and
``pypackage.json``\-aware tools should ignore the ``setup.py``; this
@ -560,7 +560,7 @@ demarcated).
In general, the need to isolate build backends into their own process
means that we can't remove IPC complexity entirely -- but by placing
both sides of the IPC channel under the control of a single project,
we make it much much cheaper to fix bugs in the IPC interface than if
we make it much cheaper to fix bugs in the IPC interface than if
fixing bugs requires coordinated agreement and coordinated changes
across the ecosystem.

View File

@ -82,7 +82,7 @@ Algol-style scoping model that is now standard in many programming
languages, including JavaScript, Perl, Ruby, Scheme, Smalltalk,
C with GNU extensions, and C# 2.0.
It has been argued that that such a feature isn't necessary, because
It has been argued that such a feature isn't necessary, because
a rebindable outer variable can be simulated by wrapping it in a
mutable object::

View File

@ -422,7 +422,7 @@ always read back exactly the characters you wrote.
Unicode encoding/decoding Issues
--------------------------------
We should allow allow changing the encoding and error-handling
We should allow changing the encoding and error-handling
setting later. The behavior of Text I/O operations in the face of
Unicode problems and ambiguities (e.g. diacritics, surrogates, invalid
bytes in an encoding) should be the same as that of the unicode

View File

@ -551,7 +551,7 @@ PyBUF_UPDATEIFCOPY to determine whether the returned buffer should be
readable, writable, or set to update the original buffer if a copy
must be made. If buffertype is PyBUF_WRITE and the buffer is not
contiguous an error will be raised. In this circumstance, the user
can use PyBUF_UPDATEIFCOPY to ensure that a a writable temporary
can use PyBUF_UPDATEIFCOPY to ensure that a writable temporary
contiguous buffer is returned. The contents of this contiguous buffer
will be copied back into the original object after the memoryview
object is deleted as long as the original object is writable. If this

View File

@ -250,7 +250,7 @@ B) or issubclass(type(x), B)``. (It is possible ``type(x)`` and
``x.__class__`` are not the same object, e.g. when x is a proxy
object.)
These methods are intended to be be called on classes whose metaclass
These methods are intended to be called on classes whose metaclass
is (derived from) ``ABCMeta``; for example::
from abc import ABCMeta

View File

@ -220,7 +220,7 @@ and an optional "predicate" object.
The default predicate implementation is a tuple of types with
positional matching to the overloaded function's arguments. However,
an arbitrary number of other kinds of of predicates can be created and
an arbitrary number of other kinds of predicates can be created and
registered using the `Extension API`_, and will then be usable with
``@when`` and other decorators created by this module (like
``@before``, ``@after``, and ``@around``).

View File

@ -402,7 +402,7 @@ supporters and few, if any, staunch opponents, among the Python community.
Syntax for supported radices
-----------------------------
This proposal is to to use a "0o" prefix with either uppercase
This proposal is to use a "0o" prefix with either uppercase
or lowercase "o" for octal, and a "0b" prefix with either
uppercase or lowercase "b" for binary.

View File

@ -112,7 +112,7 @@ Rationale
To keep things simpler, the C API calls for setting an exception
will not automatically set the exception's '__context__'. Guido
van Rossum has has expressed concerns with making such changes [8].
van Rossum has expressed concerns with making such changes [8].
As for other languages, Java and Ruby both discard the original
exception when another exception occurs in a 'catch'/'rescue' or

View File

@ -78,7 +78,7 @@ The second collections of items has been steadily increasing over the years
causing clutter in sys. Guido has even said he doesn't recognize some of things
in it [#bug-1522]_!
Moving these items items off to another module would send a clear message to
Moving these items off to another module would send a clear message to
other Python implementations about what functions need and need not be
implemented.
@ -119,7 +119,7 @@ Transition Plan
===============
Once implemented in 3.x, the interpreter module will be back-ported to 2.6.
Py3k warnings will be added the the sys functions it replaces.
Py3k warnings will be added to the sys functions it replaces.
Open Issues

View File

@ -150,7 +150,7 @@ References:
[1] Appealing to authority is a logical fallacy, but Vint Cerf is an
an authority who can't be ignored. Full text of the email
authority who can't be ignored. Full text of the email
follows:
"""

View File

@ -52,7 +52,7 @@ Rationale:
Windows builds of Python. Practically every I/O object in Python has a
file-like wrapper of some sort. Sockets already act as such and for
strings there is StringIO. Popen can be made to act like a file by simply
using the methods attached the the subprocess.Popen.stderr, stdout and
using the methods attached to the subprocess.Popen.stderr, stdout and
stdin file-like objects. But when using the read and write methods of
those options, you do not have the benefit of asynchronous I/O. In the
proposed solution the wrapper wraps the asynchronous methods to mimic a

View File

@ -389,11 +389,11 @@ Web Crawl Example
Rationale
=========
The proposed design of this module was heavily influenced by the the
The proposed design of this module was heavily influenced by the
Java java.util.concurrent package [1]_. The conceptual basis of the
module, as in Java, is the Future class, which represents the progress
and result of an asynchronous computation. The Future class makes
little commitment to the evaluation mode being used e.g. it can be be
little commitment to the evaluation mode being used e.g. it can be
used to represent lazy or eager evaluation, for evaluation using
threads, processes or remote procedure call.

View File

@ -984,7 +984,7 @@ public API is as follows, indicating the differences with PEP 3148:
- ``cancel()``. If the Future is already done (or cancelled), do
nothing and return ``False``. Otherwise, this attempts to cancel
the Future and returns ``True``. If the the cancellation attempt is
the Future and returns ``True``. If the cancellation attempt is
successful, eventually the Future's state will change to cancelled
(so that ``cancelled()`` will return ``True``)
and the callbacks will be scheduled. For regular Futures,