Commit 55f41e45 authored by Andre Delfino's avatar Andre Delfino Committed by Serhiy Storchaka

Correct a couple of unbalanced parenthesis. (GH-10779)

parent 1ce853f3
...@@ -198,7 +198,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. ...@@ -198,7 +198,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
indicates that no de-referencing should occur (striding in a contiguous indicates that no de-referencing should occur (striding in a contiguous
memory block). memory block).
If all suboffsets are negative (i.e. no de-referencing is needed, then If all suboffsets are negative (i.e. no de-referencing is needed), then
this field must be NULL (the default value). this field must be NULL (the default value).
This type of array representation is used by the Python Imaging Library This type of array representation is used by the Python Imaging Library
......
...@@ -277,7 +277,7 @@ However sometimes you have to run the embedded Python interpreter in the same ...@@ -277,7 +277,7 @@ However sometimes you have to run the embedded Python interpreter in the same
thread as your rest application and you can't allow the thread as your rest application and you can't allow the
:c:func:`PyRun_InteractiveLoop` to stop while waiting for user input. The one :c:func:`PyRun_InteractiveLoop` to stop while waiting for user input. The one
solution then is to call :c:func:`PyParser_ParseString` and test for ``e.error`` solution then is to call :c:func:`PyParser_ParseString` and test for ``e.error``
equal to ``E_EOF``, which means the input is incomplete). Here's a sample code equal to ``E_EOF``, which means the input is incomplete. Here's a sample code
fragment, untested, inspired by code from Alex Farber:: fragment, untested, inspired by code from Alex Farber::
#include <Python.h> #include <Python.h>
......
...@@ -91,7 +91,7 @@ The :mod:`crypt` module defines the following functions: ...@@ -91,7 +91,7 @@ The :mod:`crypt` module defines the following functions:
may be available on all platforms), or a full encrypted password may be available on all platforms), or a full encrypted password
including salt, as returned by this function. If *salt* is not including salt, as returned by this function. If *salt* is not
provided, the strongest method will be used (as returned by provided, the strongest method will be used (as returned by
:func:`methods`. :func:`methods`).
Checking a password is usually done by passing the plain-text password Checking a password is usually done by passing the plain-text password
as *word* and the full results of a previous :func:`crypt` call, as *word* and the full results of a previous :func:`crypt` call,
......
...@@ -152,7 +152,7 @@ Here are the methods of the :class:`Message` class: ...@@ -152,7 +152,7 @@ Here are the methods of the :class:`Message` class:
Return ``True`` if the message's payload is a list of Return ``True`` if the message's payload is a list of
sub-\ :class:`Message` objects, otherwise return ``False``. When sub-\ :class:`Message` objects, otherwise return ``False``. When
:meth:`is_multipart` returns ``False``, the payload should be a string :meth:`is_multipart` returns ``False``, the payload should be a string
object (which might be a CTE encoded binary payload. (Note that object (which might be a CTE encoded binary payload). (Note that
:meth:`is_multipart` returning ``True`` does not necessarily mean that :meth:`is_multipart` returning ``True`` does not necessarily mean that
"msg.get_content_maintype() == 'multipart'" will return the ``True``. "msg.get_content_maintype() == 'multipart'" will return the ``True``.
For example, ``is_multipart`` will return ``True`` when the For example, ``is_multipart`` will return ``True`` when the
......
...@@ -92,7 +92,7 @@ message objects. ...@@ -92,7 +92,7 @@ message objects.
.. method:: __str__() .. method:: __str__()
Equivalent to `as_string(policy=self.policy.clone(utf8=True)`. Allows Equivalent to ``as_string(policy=self.policy.clone(utf8=True))``. Allows
``str(msg)`` to produce a string containing the serialized message in a ``str(msg)`` to produce a string containing the serialized message in a
readable format. readable format.
...@@ -379,7 +379,7 @@ message objects. ...@@ -379,7 +379,7 @@ message objects.
Note that existing parameter values of headers may be accessed through Note that existing parameter values of headers may be accessed through
the :attr:`~email.headerregistry.BaseHeader.params` attribute of the the :attr:`~email.headerregistry.BaseHeader.params` attribute of the
header value (for example, ``msg['Content-Type'].params['charset']``. header value (for example, ``msg['Content-Type'].params['charset']``).
.. versionchanged:: 3.4 ``replace`` keyword was added. .. versionchanged:: 3.4 ``replace`` keyword was added.
...@@ -679,7 +679,7 @@ message objects. ...@@ -679,7 +679,7 @@ message objects.
specified by the current :mod:`~email.policy`. If the added part specified by the current :mod:`~email.policy`. If the added part
has no :mailheader:`Content-Disposition` header, add one with the value has no :mailheader:`Content-Disposition` header, add one with the value
``attachment``. This method can be used both for explicit attachments ``attachment``. This method can be used both for explicit attachments
(:mailheader:`Content-Disposition: attachment` and ``inline`` attachments (:mailheader:`Content-Disposition: attachment`) and ``inline`` attachments
(:mailheader:`Content-Disposition: inline`), by passing appropriate (:mailheader:`Content-Disposition: inline`), by passing appropriate
options to the ``content_manager``. options to the ``content_manager``.
......
...@@ -164,7 +164,7 @@ message body, instead setting the payload to the raw body. ...@@ -164,7 +164,7 @@ message body, instead setting the payload to the raw body.
envelope header. The header block is terminated either by the end of the envelope header. The header block is terminated either by the end of the
data or by a blank line. Following the header block is the body of the data or by a blank line. Following the header block is the body of the
message (which may contain MIME-encoded subparts, including subparts message (which may contain MIME-encoded subparts, including subparts
with a :mailheader:`Content-Transfer-Encoding` of ``8bit``. with a :mailheader:`Content-Transfer-Encoding` of ``8bit``).
Optional *headersonly* is a flag specifying whether to stop parsing after Optional *headersonly* is a flag specifying whether to stop parsing after
reading the headers or not. The default is ``False``, meaning it parses reading the headers or not. The default is ``False``, meaning it parses
......
...@@ -52,7 +52,7 @@ will be set as :attr:`__cause__` on the raised exception. Setting ...@@ -52,7 +52,7 @@ will be set as :attr:`__cause__` on the raised exception. Setting
:attr:`__cause__` also implicitly sets the :attr:`__suppress_context__` :attr:`__cause__` also implicitly sets the :attr:`__suppress_context__`
attribute to ``True``, so that using ``raise new_exc from None`` attribute to ``True``, so that using ``raise new_exc from None``
effectively replaces the old exception with the new one for display effectively replaces the old exception with the new one for display
purposes (e.g. converting :exc:`KeyError` to :exc:`AttributeError`, while purposes (e.g. converting :exc:`KeyError` to :exc:`AttributeError`), while
leaving the old exception available in :attr:`__context__` for introspection leaving the old exception available in :attr:`__context__` for introspection
when debugging. when debugging.
......
...@@ -443,7 +443,7 @@ Notes: ...@@ -443,7 +443,7 @@ Notes:
(4) (4)
Performing these calculations with at least one extra sign extension bit in Performing these calculations with at least one extra sign extension bit in
a finite two's complement representation (a working bit-width of a finite two's complement representation (a working bit-width of
``1 + max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the ``1 + max(x.bit_length(), y.bit_length())`` or more) is sufficient to get the
same result as if there were an infinite number of sign bits. same result as if there were an infinite number of sign bits.
...@@ -3222,7 +3222,7 @@ place, and instead produce new objects. ...@@ -3222,7 +3222,7 @@ place, and instead produce new objects.
Return a copy of the sequence left filled with ASCII ``b'0'`` digits to Return a copy of the sequence left filled with ASCII ``b'0'`` digits to
make a sequence of length *width*. A leading sign prefix (``b'+'``/ make a sequence of length *width*. A leading sign prefix (``b'+'``/
``b'-'`` is handled by inserting the padding *after* the sign character ``b'-'``) is handled by inserting the padding *after* the sign character
rather than before. For :class:`bytes` objects, the original sequence is rather than before. For :class:`bytes` objects, the original sequence is
returned if *width* is less than or equal to ``len(seq)``. returned if *width* is less than or equal to ``len(seq)``.
......
...@@ -185,7 +185,7 @@ Other functions ...@@ -185,7 +185,7 @@ Other functions
Windows will return one of: Windows will return one of:
- win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) - win-amd64 (64bit Windows on AMD64, aka x86_64, Intel64, and EM64T)
- win32 (all others - specifically, sys.platform is returned) - win32 (all others - specifically, sys.platform is returned)
Mac OS X can return: Mac OS X can return:
......
...@@ -1639,7 +1639,7 @@ returned; otherwise, *y* is evaluated and the resulting value is returned. ...@@ -1639,7 +1639,7 @@ returned; otherwise, *y* is evaluated and the resulting value is returned.
The expression ``x or y`` first evaluates *x*; if *x* is true, its value is The expression ``x or y`` first evaluates *x*; if *x* is true, its value is
returned; otherwise, *y* is evaluated and the resulting value is returned. returned; otherwise, *y* is evaluated and the resulting value is returned.
(Note that neither :keyword:`and` nor :keyword:`or` restrict the value and type Note that neither :keyword:`and` nor :keyword:`or` restrict the value and type
they return to ``False`` and ``True``, but rather return the last evaluated they return to ``False`` and ``True``, but rather return the last evaluated
argument. This is sometimes useful, e.g., if ``s`` is a string that should be argument. This is sometimes useful, e.g., if ``s`` is a string that should be
replaced by a default value if it is empty, the expression ``s or 'foo'`` yields replaced by a default value if it is empty, the expression ``s or 'foo'`` yields
......
...@@ -613,11 +613,11 @@ user's "application data" directory (i.e. the directory returned by calling the ...@@ -613,11 +613,11 @@ user's "application data" directory (i.e. the directory returned by calling the
Windows function ``SHGetFolderPath`` with ``CSIDL_LOCAL_APPDATA``) and ``py.ini`` in the Windows function ``SHGetFolderPath`` with ``CSIDL_LOCAL_APPDATA``) and ``py.ini`` in the
same directory as the launcher. The same .ini files are used for both the same directory as the launcher. The same .ini files are used for both the
'console' version of the launcher (i.e. py.exe) and for the 'windows' version 'console' version of the launcher (i.e. py.exe) and for the 'windows' version
(i.e. pyw.exe) (i.e. pyw.exe).
Customization specified in the "application directory" will have precedence over Customization specified in the "application directory" will have precedence over
the one next to the executable, so a user, who may not have write access to the the one next to the executable, so a user, who may not have write access to the
.ini file next to the launcher, can override commands in that global .ini file) .ini file next to the launcher, can override commands in that global .ini file.
Customizing default Python versions Customizing default Python versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment