mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Remove duplication.
This commit is contained in:
@@ -27,7 +27,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
|
||||
.. c:function:: PyObject* PyInstanceMethod_New(PyObject *func)
|
||||
|
||||
Return a new instance method object, with *func* being any callable object
|
||||
*func* is is the function that will be called when the instance method is
|
||||
*func* is the function that will be called when the instance method is
|
||||
called.
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ no longer available.
|
||||
.. c:function:: PyObject* PyMethod_New(PyObject *func, PyObject *self)
|
||||
|
||||
Return a new method object, with *func* being any callable object and *self*
|
||||
the instance the method should be bound. *func* is is the function that will
|
||||
the instance the method should be bound. *func* is the function that will
|
||||
be called when the method is called. *self* must not be *NULL*.
|
||||
|
||||
|
||||
|
||||
@@ -1745,7 +1745,7 @@ Subclasses of :class:`Command` must define the following methods.
|
||||
Set final values for all the options that this command supports. This is
|
||||
always called as late as possible, ie. after any option assignments from the
|
||||
command-line or from other commands have been done. Thus, this is the place
|
||||
to to code option dependencies: if *foo* depends on *bar*, then it is safe to
|
||||
to code option dependencies: if *foo* depends on *bar*, then it is safe to
|
||||
set *foo* from *bar* as long as *foo* still has the same value it was
|
||||
assigned in :meth:`initialize_options`.
|
||||
|
||||
|
||||
@@ -960,7 +960,7 @@ and each time it reaches the size limit it is renamed with the suffix
|
||||
``.1``. Each of the existing backup files is renamed to increment the suffix
|
||||
(``.1`` becomes ``.2``, etc.) and the ``.6`` file is erased.
|
||||
|
||||
Obviously this example sets the log length much much too small as an extreme
|
||||
Obviously this example sets the log length much too small as an extreme
|
||||
example. You would want to set *maxBytes* to an appropriate value.
|
||||
|
||||
.. _zeromq-handlers:
|
||||
|
||||
@@ -328,7 +328,7 @@ the bytes/string dichotomy. Because Python 2 allowed the ``str`` type to hold
|
||||
textual data, people have over the years been rather loose in their delineation
|
||||
of what ``str`` instances held text compared to bytes. In Python 3 you cannot
|
||||
be so care-free anymore and need to properly handle the difference. The key
|
||||
handling this issue to to make sure that **every** string literal in your
|
||||
handling this issue to make sure that **every** string literal in your
|
||||
Python 2 code is either syntactically of functionally marked as either bytes or
|
||||
text data. After this is done you then need to make sure your APIs are designed
|
||||
to either handle a specific type or made to be properly polymorphic.
|
||||
|
||||
@@ -264,7 +264,7 @@ used for the deployment of WSGI applications.
|
||||
|
||||
* `FastCGI, SCGI, and Apache: Background and Future
|
||||
<http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/>`_
|
||||
is a discussion on why the concept of FastCGI and SCGI is better that that
|
||||
is a discussion on why the concept of FastCGI and SCGI is better than that
|
||||
of mod_python.
|
||||
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ counts, but the output will exclude results with counts of zero or less.
|
||||
* The multiset methods are designed only for use cases with positive values.
|
||||
The inputs may be negative or zero, but only outputs with positive values
|
||||
are created. There are no type restrictions, but the value type needs to
|
||||
support support addition, subtraction, and comparison.
|
||||
support addition, subtraction, and comparison.
|
||||
|
||||
* The :meth:`elements` method requires integer counts. It ignores zero and
|
||||
negative counts.
|
||||
|
||||
@@ -14,7 +14,7 @@ and :source:`Lib/concurrent/futures/process.py`
|
||||
The :mod:`concurrent.futures` module provides a high-level interface for
|
||||
asynchronously executing callables.
|
||||
|
||||
The asynchronous execution can be be performed with threads, using
|
||||
The asynchronous execution can be performed with threads, using
|
||||
:class:`ThreadPoolExecutor`, or separate processes, using
|
||||
:class:`ProcessPoolExecutor`. Both implement the same interface, which is
|
||||
defined by the abstract :class:`Executor` class.
|
||||
|
||||
@@ -1958,7 +1958,7 @@ Utility functions
|
||||
|
||||
.. function:: string_at(address, size=-1)
|
||||
|
||||
This function returns the C string starting at memory address address as a bytes
|
||||
This function returns the C string starting at memory address *address* as a bytes
|
||||
object. If size is specified, it is used as size, otherwise the string is assumed
|
||||
to be zero-terminated.
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ Here are the methods of the :class:`Message` class:
|
||||
|
||||
Content-Disposition: attachment; filename="bud.gif"
|
||||
|
||||
An example with with non-ASCII characters::
|
||||
An example with non-ASCII characters::
|
||||
|
||||
msg.add_header('Content-Disposition', 'attachment',
|
||||
filename=('iso-8859-1', '', 'Fußballer.ppt'))
|
||||
|
||||
@@ -828,7 +828,7 @@ are always available. They are listed here in alphabetical order.
|
||||
.. note::
|
||||
|
||||
Python doesn't depend on the underlying operating system's notion of text
|
||||
files; all the the processing is done by Python itself, and is therefore
|
||||
files; all the processing is done by Python itself, and is therefore
|
||||
platform-independent.
|
||||
|
||||
*buffering* is an optional integer used to set the buffering policy. Pass 0
|
||||
|
||||
@@ -435,7 +435,7 @@ HTTPConnection Objects
|
||||
Set the host and the port for HTTP Connect Tunnelling. Normally used when it
|
||||
is required to a HTTPS Connection through a proxy server.
|
||||
|
||||
The headers argument should be a mapping of extra HTTP headers to to sent
|
||||
The headers argument should be a mapping of extra HTTP headers to sent
|
||||
with the CONNECT request.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
@@ -780,7 +780,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
|
||||
There is no requirement that :class:`Message` instances be used to represent
|
||||
messages retrieved using :class:`Mailbox` instances. In some situations, the
|
||||
time and memory required to generate :class:`Message` representations might
|
||||
not not acceptable. For such situations, :class:`Mailbox` instances also
|
||||
not be acceptable. For such situations, :class:`Mailbox` instances also
|
||||
offer string and file-like representations, and a custom message factory may
|
||||
be specified when a :class:`Mailbox` instance is initialized.
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
|
||||
|
||||
.. method:: write_byte(byte)
|
||||
|
||||
Write the the integer *byte* into memory at the current
|
||||
Write the integer *byte* into memory at the current
|
||||
position of the file pointer; the file position is advanced by ``1``. If
|
||||
the mmap was created with :const:`ACCESS_READ`, then writing to it will
|
||||
raise a :exc:`TypeError` exception.
|
||||
|
||||
@@ -1494,7 +1494,7 @@ itself. This means, for example, that one shared object can contain a second:
|
||||
a new shared object -- see documentation for the *method_to_typeid*
|
||||
argument of :meth:`BaseManager.register`.
|
||||
|
||||
If an exception is raised by the call, then then is re-raised by
|
||||
If an exception is raised by the call, then is re-raised by
|
||||
:meth:`_callmethod`. If some other exception is raised in the manager's
|
||||
process then this is converted into a :exc:`RemoteError` exception and is
|
||||
raised by :meth:`_callmethod`.
|
||||
@@ -1631,7 +1631,7 @@ with the :class:`Pool` class.
|
||||
|
||||
The *chunksize* argument is the same as the one used by the :meth:`.map`
|
||||
method. For very long iterables using a large value for *chunksize* can
|
||||
make make the job complete **much** faster than using the default value of
|
||||
make the job complete **much** faster than using the default value of
|
||||
``1``.
|
||||
|
||||
Also if *chunksize* is ``1`` then the :meth:`!next` method of the iterator
|
||||
|
||||
@@ -243,7 +243,7 @@ Connection Objects
|
||||
.. method:: Connection.commit()
|
||||
|
||||
This method commits the current transaction. If you don't call this method,
|
||||
anything you did since the last call to ``commit()`` is not visible from from
|
||||
anything you did since the last call to ``commit()`` is not visible from
|
||||
other database connections. If you wonder why you don't see the data you've
|
||||
written to the database, please check you didn't forget to call this method.
|
||||
|
||||
|
||||
@@ -1117,7 +1117,7 @@ functions based on regular expressions.
|
||||
characters and there is at least one character, false
|
||||
otherwise. Decimal characters are those from general category "Nd". This category
|
||||
includes digit characters, and all characters
|
||||
that that can be used to form decimal-radix numbers, e.g. U+0660,
|
||||
that can be used to form decimal-radix numbers, e.g. U+0660,
|
||||
ARABIC-INDIC DIGIT ZERO.
|
||||
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ by a colon ``':'``. These specify a non-default format for the replacement valu
|
||||
|
||||
See also the :ref:`formatspec` section.
|
||||
|
||||
The *field_name* itself begins with an *arg_name* that is either either a number or a
|
||||
The *field_name* itself begins with an *arg_name* that is either a number or a
|
||||
keyword. If it's a number, it refers to a positional argument, and if it's a keyword,
|
||||
it refers to a named keyword argument. If the numerical arg_names in a format string
|
||||
are 0, 1, 2, ... in sequence, they can all be omitted (not just some)
|
||||
|
||||
@@ -864,7 +864,7 @@ As an example, here is a simple way to synchronize a client and server thread::
|
||||
|
||||
Pass the barrier. When all the threads party to the barrier have called
|
||||
this function, they are all released simultaneously. If a *timeout* is
|
||||
provided, is is used in preference to any that was supplied to the class
|
||||
provided, it is used in preference to any that was supplied to the class
|
||||
constructor.
|
||||
|
||||
The return value is an integer in the range 0 to *parties* -- 1, different
|
||||
|
||||
@@ -1240,7 +1240,7 @@ option. If you don't know the class name of a widget, use the method
|
||||
*layoutspec*, if specified, is expected to be a list or some other
|
||||
sequence type (excluding strings), where each item should be a tuple and
|
||||
the first item is the layout name and the second item should have the
|
||||
format described described in `Layouts`_.
|
||||
format described in `Layouts`_.
|
||||
|
||||
To understand the format, see the following example (it is not
|
||||
intended to do anything useful)::
|
||||
|
||||
@@ -478,7 +478,7 @@ value --- this is a syntactic restriction that is not expressed by the grammar.
|
||||
|
||||
**Default parameter values are evaluated when the function definition is
|
||||
executed.** This means that the expression is evaluated once, when the function
|
||||
is defined, and that that same "pre-computed" value is used for each call. This
|
||||
is defined, and that the same "pre-computed" value is used for each call. This
|
||||
is especially important to understand when a default parameter is a mutable
|
||||
object, such as a list or a dictionary: if the function modifies the object
|
||||
(e.g. by appending an item to a list), the default value is in effect modified.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user