Skip to content

Commit 37b2e8f

Browse files
committed
Deploying to gh-pages from @ e51ff67 🚀
1 parent bbbca89 commit 37b2e8f

File tree

556 files changed

+1322
-1208
lines changed

Some content is hidden

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

556 files changed

+1322
-1208
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: c1095522e9f73f1efe558ee151e1aca8
3+
config: a54960f7a6d223d2009df8a8b7242219
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/faq/general.rst.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ Python versions are numbered "A.B.C" or "A.B":
133133
changes.
134134
* *C* is the micro version number -- it is incremented for each bugfix release.
135135

136-
See :pep:`6` for more information about bugfix releases.
137-
138136
Not all releases are bugfix releases. In the run-up to a new feature release, a
139137
series of development releases are made, denoted as alpha, beta, or release
140138
candidate. Alphas are early releases in which interfaces aren't yet finalized;
@@ -157,7 +155,11 @@ unreleased versions, built directly from the CPython development repository. In
157155
practice, after a final minor release is made, the version is incremented to the
158156
next minor version, which becomes the "a0" version, e.g. "2.4a0".
159157

160-
See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, and
158+
See the `Developer's Guide
159+
<https://devguide.python.org/developer-workflow/development-cycle/>`__
160+
for more information about the development cycle, and
161+
:pep:`387` to learn more about Python's backward compatibility policy. See also
162+
the documentation for :data:`sys.version`, :data:`sys.hexversion`, and
161163
:data:`sys.version_info`.
162164

163165

_sources/library/abc.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ a helper class :class:`ABC` to alternatively define ABCs through inheritance:
101101
subclass of the ABC. (This class method is called from the
102102
:meth:`~class.__subclasscheck__` method of the ABC.)
103103

104-
This method should return ``True``, ``False`` or ``NotImplemented``. If
104+
This method should return ``True``, ``False`` or :data:`NotImplemented`. If
105105
it returns ``True``, the *subclass* is considered a subclass of this ABC.
106106
If it returns ``False``, the *subclass* is not considered a subclass of
107107
this ABC, even if it would normally be one. If it returns
108-
``NotImplemented``, the subclass check is continued with the usual
108+
:data:`!NotImplemented`, the subclass check is continued with the usual
109109
mechanism.
110110

111111
.. XXX explain the "usual mechanism"

_sources/library/ast.rst.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,14 +2178,17 @@ and classes for traversing abstract syntax trees:
21782178
modified to correspond to :pep:`484` "signature type comments",
21792179
e.g. ``(str, int) -> List[str]``.
21802180

2181-
Also, setting ``feature_version`` to a tuple ``(major, minor)``
2182-
will attempt to parse using that Python version's grammar.
2183-
Currently ``major`` must equal to ``3``. For example, setting
2184-
``feature_version=(3, 4)`` will allow the use of ``async`` and
2185-
``await`` as variable names. The lowest supported version is
2186-
``(3, 4)``; the highest is ``sys.version_info[0:2]``.
2187-
2188-
If source contains a null character ('\0'), :exc:`ValueError` is raised.
2181+
Setting ``feature_version`` to a tuple ``(major, minor)`` will result in
2182+
a "best-effort" attempt to parse using that Python version's grammar.
2183+
For example, setting ``feature_version=(3, 9)`` will attempt to disallow
2184+
parsing of :keyword:`match` statements.
2185+
Currently ``major`` must equal to ``3``. The lowest supported version is
2186+
``(3, 4)`` (and this may increase in future Python versions);
2187+
the highest is ``sys.version_info[0:2]``. "Best-effort" attempt means there
2188+
is no guarantee that the parse (or success of the parse) is the same as
2189+
when run on the Python version corresponding to ``feature_version``.
2190+
2191+
If source contains a null character (``\0``), :exc:`ValueError` is raised.
21892192

21902193
.. warning::
21912194
Note that successfully parsing source code into an AST object doesn't

_sources/library/asyncio-stream.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ StreamWriter
347347
be resumed. When there is nothing to wait for, the :meth:`drain`
348348
returns immediately.
349349

350-
.. coroutinemethod:: start_tls(sslcontext, \*, server_hostname=None, \
350+
.. coroutinemethod:: start_tls(sslcontext, *, server_hostname=None, \
351351
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
352352

353353
Upgrade an existing stream-based connection to TLS.

_sources/library/constants.rst.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ A small number of constants live in the built-in namespace. They are:
3333
the other type; may be returned by the in-place binary special methods
3434
(e.g. :meth:`~object.__imul__`, :meth:`~object.__iand__`, etc.) for the same purpose.
3535
It should not be evaluated in a boolean context.
36-
``NotImplemented`` is the sole instance of the :data:`types.NotImplementedType` type.
36+
:data:`!NotImplemented` is the sole instance of the :data:`types.NotImplementedType` type.
3737

3838
.. note::
3939

40-
When a binary (or in-place) method returns ``NotImplemented`` the
40+
When a binary (or in-place) method returns :data:`!NotImplemented` the
4141
interpreter will try the reflected operation on the other type (or some
4242
other fallback, depending on the operator). If all attempts return
43-
``NotImplemented``, the interpreter will raise an appropriate exception.
44-
Incorrectly returning ``NotImplemented`` will result in a misleading
45-
error message or the ``NotImplemented`` value being returned to Python code.
43+
:data:`!NotImplemented`, the interpreter will raise an appropriate exception.
44+
Incorrectly returning :data:`!NotImplemented` will result in a misleading
45+
error message or the :data:`!NotImplemented` value being returned to Python code.
4646

4747
See :ref:`implementing-the-arithmetic-operations` for examples.
4848

4949
.. note::
5050

51-
``NotImplementedError`` and ``NotImplemented`` are not interchangeable,
51+
``NotImplementedError`` and :data:`!NotImplemented` are not interchangeable,
5252
even though they have similar names and purposes.
5353
See :exc:`NotImplementedError` for details on when to use it.
5454

5555
.. versionchanged:: 3.9
56-
Evaluating ``NotImplemented`` in a boolean context is deprecated. While
56+
Evaluating :data:`!NotImplemented` in a boolean context is deprecated. While
5757
it currently evaluates as true, it will emit a :exc:`DeprecationWarning`.
5858
It will raise a :exc:`TypeError` in a future version of Python.
5959

_sources/library/datetime.rst.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,9 @@ Supported operations:
11931193
that are not also :class:`!datetime` instances, even if they represent
11941194
the same date.
11951195

1196+
If both comparands are aware, and have the same :attr:`!tzinfo` attribute,
1197+
the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and
1198+
the base datetimes are compared.
11961199
If both comparands are aware and have different :attr:`~.datetime.tzinfo`
11971200
attributes, the comparison acts as comparands were first converted to UTC
11981201
datetimes except that the implementation never overflows.
@@ -1207,6 +1210,9 @@ Supported operations:
12071210
as well as a :class:`!datetime` object and a :class:`!date` object
12081211
that is not also a :class:`!datetime` instance, raises :exc:`TypeError`.
12091212

1213+
If both comparands are aware, and have the same :attr:`!tzinfo` attribute,
1214+
the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and
1215+
the base datetimes are compared.
12101216
If both comparands are aware and have different :attr:`~.datetime.tzinfo`
12111217
attributes, the comparison acts as comparands were first converted to UTC
12121218
datetimes except that the implementation never overflows.
@@ -1752,8 +1758,8 @@ Naive and aware :class:`!time` objects are never equal.
17521758
Order comparison between naive and aware :class:`!time` objects raises
17531759
:exc:`TypeError`.
17541760

1755-
If both comparands are aware, and have
1756-
the same :attr:`~.time.tzinfo` attribute, the common :attr:`!tzinfo` attribute is
1761+
If both comparands are aware, and have the same :attr:`~.time.tzinfo`
1762+
attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are
17571763
ignored and the base times are compared. If both comparands are aware and
17581764
have different :attr:`!tzinfo` attributes, the comparands are first adjusted by
17591765
subtracting their UTC offsets (obtained from ``self.utcoffset()``).

_sources/library/enum.rst.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Data Types
170170
final *enum*, as well as creating the enum members, properly handling
171171
duplicates, providing iteration over the enum class, etc.
172172

173-
.. method:: EnumType.__call__(cls, value, names=None, \*, module=None, qualname=None, type=None, start=1, boundary=None)
173+
.. method:: EnumType.__call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
174174

175175
This method is called in two different ways:
176176

@@ -340,7 +340,7 @@ Data Types
340340
>>> PowersOfThree.SECOND.value
341341
9
342342

343-
.. method:: Enum.__init__(self, \*args, \**kwds)
343+
.. method:: Enum.__init__(self, *args, **kwds)
344344

345345
By default, does nothing. If multiple values are given in the member
346346
assignment, those values become separate arguments to ``__init__``; e.g.
@@ -351,7 +351,7 @@ Data Types
351351

352352
``Weekday.__init__()`` would be called as ``Weekday.__init__(self, 1, 'Mon')``
353353

354-
.. method:: Enum.__init_subclass__(cls, \**kwds)
354+
.. method:: Enum.__init_subclass__(cls, **kwds)
355355

356356
A *classmethod* that is used to further configure subsequent subclasses.
357357
By default, does nothing.
@@ -378,7 +378,7 @@ Data Types
378378
>>> Build('deBUG')
379379
<Build.DEBUG: 'debug'>
380380

381-
.. method:: Enum.__new__(cls, \*args, \**kwds)
381+
.. method:: Enum.__new__(cls, *args, **kwds)
382382

383383
By default, doesn't exist. If specified, either in the enum class
384384
definition or in a mixin class (such as ``int``), all values given
@@ -390,6 +390,9 @@ Data Types
390390

391391
results in the call ``int('1a', 16)`` and a value of ``17`` for the member.
392392

393+
..note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
394+
call the appropriate ``__new__`` instead.
395+
393396
.. method:: Enum.__repr__(self)
394397

395398
Returns the string used for *repr()* calls. By default, returns the

_sources/library/exceptions.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ The following exceptions are the exceptions that are usually raised.
335335

336336
.. note::
337337

338-
``NotImplementedError`` and ``NotImplemented`` are not interchangeable,
338+
``NotImplementedError`` and :data:`NotImplemented` are not interchangeable,
339339
even though they have similar names and purposes. See
340-
:data:`NotImplemented` for details on when to use it.
340+
:data:`!NotImplemented` for details on when to use it.
341341

342342
.. exception:: OSError([arg])
343343
OSError(errno, strerror[, filename[, winerror[, filename2]]])

_sources/library/hashlib.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ More condensed:
121121
Constructors
122122
------------
123123

124-
.. function:: new(name[, data], \*, usedforsecurity=True)
124+
.. function:: new(name[, data], *, usedforsecurity=True)
125125

126126
Is a generic constructor that takes the string *name* of the desired
127127
algorithm as its first parameter. It also exists to allow access to the

0 commit comments

Comments
 (0)