Skip to content

Commit f8020c5

Browse files
committed
Deploying to gh-pages from @ a850336 🚀
1 parent ffe33e2 commit f8020c5

File tree

563 files changed

+1852
-1418
lines changed

Some content is hidden

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

563 files changed

+1852
-1418
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 22b93d79a6e2b655281e07781f03cbb7
3+
config: 5ed0fcad641de016763490be4730d71e
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/c-api/structures.rst.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,11 @@ The following flags can be used with :c:member:`PyMemberDef.flags`:
551551
from ``PyObject``.
552552
553553
Can only be used as part of :c:member:`Py_tp_members <PyTypeObject.tp_members>`
554-
:c:type:`slot <PyTypeSlot>` when creating a class using negative
554+
:c:type:`slot <PyType_Slot>` when creating a class using negative
555555
:c:member:`~PyType_Spec.basicsize`.
556556
It is mandatory in that case.
557557
558-
This flag is only used in :c:type:`PyTypeSlot`.
558+
This flag is only used in :c:type:`PyType_Slot`.
559559
When setting :c:member:`~PyTypeObject.tp_members` during
560560
class creation, Python clears it and sets
561561
:c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct.
@@ -693,7 +693,8 @@ Defining Getters and Setters
693693
694694
.. c:member:: setter set
695695
696-
Optional C function to set or delete the attribute, if omitted the attribute is readonly.
696+
Optional C function to set or delete the attribute.
697+
If ``NULL``, the attribute is read-only.
697698
698699
.. c:member:: const char* doc
699700
@@ -703,18 +704,18 @@ Defining Getters and Setters
703704
704705
Optional function pointer, providing additional data for getter and setter.
705706
706-
The ``get`` function takes one :c:expr:`PyObject*` parameter (the
707-
instance) and a function pointer (the associated ``closure``)::
707+
.. c:type:: PyObject *(*getter)(PyObject *, void *)
708708
709-
typedef PyObject *(*getter)(PyObject *, void *);
709+
The ``get`` function takes one :c:expr:`PyObject*` parameter (the
710+
instance) and a function pointer (the associated ``closure``):
710711
711712
It should return a new reference on success or ``NULL`` with a set exception
712713
on failure.
713714
714-
``set`` functions take two :c:expr:`PyObject*` parameters (the instance and
715-
the value to be set) and a function pointer (the associated ``closure``)::
715+
.. c:type:: int (*setter)(PyObject *, PyObject *, void *)
716716
717-
typedef int (*setter)(PyObject *, PyObject *, void *);
717+
``set`` functions take two :c:expr:`PyObject*` parameters (the instance and
718+
the value to be set) and a function pointer (the associated ``closure``):
718719
719720
In case the attribute should be deleted the second parameter is ``NULL``.
720721
Should return ``0`` on success or ``-1`` with a set exception on failure.

_sources/library/argparse.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,8 +1936,8 @@ FileType objects
19361936
>>> parser.parse_args(['-'])
19371937
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
19381938

1939-
.. versionadded:: 3.4
1940-
The *encodings* and *errors* keyword arguments.
1939+
.. versionchanged:: 3.4
1940+
Added the *encodings* and *errors* parameters.
19411941

19421942

19431943
Argument groups

_sources/library/asyncio-stream.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ and work with streams:
7777
.. versionchanged:: 3.7
7878
Added the *ssl_handshake_timeout* parameter.
7979

80-
.. versionadded:: 3.8
81-
Added *happy_eyeballs_delay* and *interleave* parameters.
80+
.. versionchanged:: 3.8
81+
Added the *happy_eyeballs_delay* and *interleave* parameters.
8282

8383
.. versionchanged:: 3.10
8484
Removed the *loop* parameter.

_sources/library/asyncio-task.rst.txt

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -825,23 +825,22 @@ Waiting Primitives
825825
*return_when* indicates when this function should return. It must
826826
be one of the following constants:
827827

828-
.. tabularcolumns:: |l|L|
829-
830-
+-----------------------------+----------------------------------------+
831-
| Constant | Description |
832-
+=============================+========================================+
833-
| :const:`FIRST_COMPLETED` | The function will return when any |
834-
| | future finishes or is cancelled. |
835-
+-----------------------------+----------------------------------------+
836-
| :const:`FIRST_EXCEPTION` | The function will return when any |
837-
| | future finishes by raising an |
838-
| | exception. If no future raises an |
839-
| | exception then it is equivalent to |
840-
| | :const:`ALL_COMPLETED`. |
841-
+-----------------------------+----------------------------------------+
842-
| :const:`ALL_COMPLETED` | The function will return when all |
843-
| | futures finish or are cancelled. |
844-
+-----------------------------+----------------------------------------+
828+
.. list-table::
829+
:header-rows: 1
830+
831+
* - Constant
832+
- Description
833+
834+
* - .. data:: FIRST_COMPLETED
835+
- The function will return when any future finishes or is cancelled.
836+
837+
* - .. data:: FIRST_EXCEPTION
838+
- The function will return when any future finishes by raising an
839+
exception. If no future raises an exception
840+
then it is equivalent to :const:`ALL_COMPLETED`.
841+
842+
* - .. data:: ALL_COMPLETED
843+
- The function will return when all futures finish or are cancelled.
845844

846845
Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the
847846
futures when a timeout occurs.

_sources/library/bdb.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ The :mod:`bdb` module also defines two classes:
132132
frame is considered to originate in a certain module is determined
133133
by the ``__name__`` in the frame globals.
134134

135-
.. versionadded:: 3.1
136-
The *skip* argument.
135+
.. versionchanged:: 3.1
136+
Added the *skip* parameter.
137137

138138
The following methods of :class:`Bdb` normally don't need to be overridden.
139139

_sources/library/concurrent.futures.rst.txt

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ And::
171171
should be higher than the number of workers
172172
for :class:`ProcessPoolExecutor`.
173173

174-
.. versionadded:: 3.6
175-
The *thread_name_prefix* argument was added to allow users to
174+
.. versionchanged:: 3.6
175+
Added the *thread_name_prefix* parameter to allow users to
176176
control the :class:`threading.Thread` names for worker threads created by
177177
the pool for easier debugging.
178178

@@ -271,7 +271,8 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.
271271

272272
.. versionchanged:: 3.3
273273
When one of the worker processes terminates abruptly, a
274-
:exc:`BrokenProcessPool` error is now raised. Previously, behaviour
274+
:exc:`~concurrent.futures.process.BrokenProcessPool` error is now raised.
275+
Previously, behaviour
275276
was undefined but operations on the executor or its futures would often
276277
freeze or deadlock.
277278

@@ -485,23 +486,22 @@ Module Functions
485486
*return_when* indicates when this function should return. It must be one of
486487
the following constants:
487488

488-
.. tabularcolumns:: |l|L|
489-
490-
+-----------------------------+----------------------------------------+
491-
| Constant | Description |
492-
+=============================+========================================+
493-
| :const:`FIRST_COMPLETED` | The function will return when any |
494-
| | future finishes or is cancelled. |
495-
+-----------------------------+----------------------------------------+
496-
| :const:`FIRST_EXCEPTION` | The function will return when any |
497-
| | future finishes by raising an |
498-
| | exception. If no future raises an |
499-
| | exception then it is equivalent to |
500-
| | :const:`ALL_COMPLETED`. |
501-
+-----------------------------+----------------------------------------+
502-
| :const:`ALL_COMPLETED` | The function will return when all |
503-
| | futures finish or are cancelled. |
504-
+-----------------------------+----------------------------------------+
489+
.. list-table::
490+
:header-rows: 1
491+
492+
* - Constant
493+
- Description
494+
495+
* - .. data:: FIRST_COMPLETED
496+
- The function will return when any future finishes or is cancelled.
497+
498+
* - .. data:: FIRST_EXCEPTION
499+
- The function will return when any future finishes by raising an
500+
exception. If no future raises an exception
501+
then it is equivalent to :const:`ALL_COMPLETED`.
502+
503+
* - .. data:: ALL_COMPLETED
504+
- The function will return when all futures finish or are cancelled.
505505

506506
.. function:: as_completed(fs, timeout=None)
507507

@@ -562,7 +562,8 @@ Exception classes
562562
.. exception:: BrokenThreadPool
563563

564564
Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception
565-
class is raised when one of the workers of a :class:`ThreadPoolExecutor`
565+
class is raised when one of the workers
566+
of a :class:`~concurrent.futures.ThreadPoolExecutor`
566567
has failed initializing.
567568

568569
.. versionadded:: 3.7
@@ -573,7 +574,8 @@ Exception classes
573574

574575
Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly
575576
:exc:`RuntimeError`), this exception class is raised when one of the
576-
workers of a :class:`ProcessPoolExecutor` has terminated in a non-clean
577+
workers of a :class:`~concurrent.futures.ProcessPoolExecutor`
578+
has terminated in a non-clean
577579
fashion (for example, if it was killed from the outside).
578580

579581
.. versionadded:: 3.3

_sources/library/configparser.rst.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,14 +1045,14 @@ ConfigParser Objects
10451045
config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')],
10461046
encoding='cp1250')
10471047

1048-
.. versionadded:: 3.2
1049-
The *encoding* parameter. Previously, all files were read using the
1050-
default encoding for :func:`open`.
1048+
.. versionchanged:: 3.2
1049+
Added the *encoding* parameter.
1050+
Previously, all files were read using the default encoding for :func:`open`.
10511051

1052-
.. versionadded:: 3.6.1
1052+
.. versionchanged:: 3.6.1
10531053
The *filenames* parameter accepts a :term:`path-like object`.
10541054

1055-
.. versionadded:: 3.7
1055+
.. versionchanged:: 3.7
10561056
The *filenames* parameter accepts a :class:`bytes` object.
10571057

10581058

@@ -1291,9 +1291,9 @@ Exceptions
12911291
that is already present or in strict parsers when a section if found more
12921292
than once in a single input file, string or dictionary.
12931293

1294-
.. versionadded:: 3.2
1295-
Optional ``source`` and ``lineno`` attributes and arguments to
1296-
:meth:`!__init__` were added.
1294+
.. versionchanged:: 3.2
1295+
Added the optional *source* and *lineno* attributes and parameters to
1296+
:meth:`!__init__`.
12971297

12981298

12991299
.. exception:: DuplicateOptionError

_sources/library/contextlib.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ Functions and classes provided:
182182
without needing to explicitly close ``page``. Even if an error occurs,
183183
``page.close()`` will be called when the :keyword:`with` block is exited.
184184

185+
.. note::
186+
187+
Most types managing resources support the :term:`context manager` protocol,
188+
which closes *thing* on leaving the :keyword:`with` statement.
189+
As such, :func:`!closing` is most useful for third party types that don't
190+
support context managers.
191+
This example is purely for illustration purposes,
192+
as :func:`~urllib.request.urlopen` would normally be used in a context manager.
185193

186194
.. function:: aclosing(thing)
187195

_sources/library/datetime.rst.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,8 @@ Constructor:
856856

857857
If an argument outside those ranges is given, :exc:`ValueError` is raised.
858858

859-
.. versionadded:: 3.6
860-
Added the ``fold`` argument.
859+
.. versionchanged:: 3.6
860+
Added the *fold* parameter.
861861

862862
Other constructors, all class methods:
863863

@@ -1252,8 +1252,8 @@ Instance methods:
12521252
``tzinfo=None`` can be specified to create a naive datetime from an aware
12531253
datetime with no conversion of date and time data.
12541254

1255-
.. versionadded:: 3.6
1256-
Added the ``fold`` argument.
1255+
.. versionchanged:: 3.6
1256+
Added the *fold* parameter.
12571257

12581258

12591259
.. method:: datetime.astimezone(tz=None)
@@ -1496,8 +1496,8 @@ Instance methods:
14961496
>>> dt.isoformat(timespec='microseconds')
14971497
'2015-01-01T12:30:59.000000'
14981498

1499-
.. versionadded:: 3.6
1500-
Added the *timespec* argument.
1499+
.. versionchanged:: 3.6
1500+
Added the *timespec* parameter.
15011501

15021502

15031503
.. method:: datetime.__str__()
@@ -1830,8 +1830,8 @@ Instance methods:
18301830
``tzinfo=None`` can be specified to create a naive :class:`.time` from an
18311831
aware :class:`.time`, without conversion of the time data.
18321832

1833-
.. versionadded:: 3.6
1834-
Added the ``fold`` argument.
1833+
.. versionchanged:: 3.6
1834+
Added the *fold* parameter.
18351835

18361836

18371837
.. method:: time.isoformat(timespec='auto')
@@ -1874,8 +1874,8 @@ Instance methods:
18741874
>>> dt.isoformat(timespec='auto')
18751875
'12:34:56'
18761876

1877-
.. versionadded:: 3.6
1878-
Added the *timespec* argument.
1877+
.. versionchanged:: 3.6
1878+
Added the *timespec* parameter.
18791879

18801880

18811881
.. method:: time.__str__()

0 commit comments

Comments
 (0)