Skip to content

Commit 468c166

Browse files
committed
Deploying to gh-pages from @ 644b84e 🚀
1 parent b9d3448 commit 468c166

File tree

541 files changed

+5107
-4959
lines changed

Some content is hidden

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

541 files changed

+5107
-4959
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: 65ad1b6f95c3911260b0169e891d1149
3+
config: 3a2b0cb0bbab1a7afa0914d93d39b059
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/c-api/function.rst.txt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,20 @@ There are a few functions specific to Python functions.
3434
Return a new function object associated with the code object *code*. *globals*
3535
must be a dictionary with the global variables accessible to the function.
3636
37-
The function's docstring and name are retrieved from the code object. *__module__*
37+
The function's docstring and name are retrieved from the code object.
38+
:attr:`~function.__module__`
3839
is retrieved from *globals*. The argument defaults, annotations and closure are
39-
set to ``NULL``. *__qualname__* is set to the same value as the code object's
40-
:attr:`~codeobject.co_qualname` field.
40+
set to ``NULL``. :attr:`~function.__qualname__` is set to the same value as
41+
the code object's :attr:`~codeobject.co_qualname` field.
4142
4243
4344
.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
4445
4546
As :c:func:`PyFunction_New`, but also allows setting the function object's
46-
``__qualname__`` attribute. *qualname* should be a unicode object or ``NULL``;
47-
if ``NULL``, the ``__qualname__`` attribute is set to the same value as the
48-
code object's :attr:`~codeobject.co_qualname` field.
47+
:attr:`~function.__qualname__` attribute.
48+
*qualname* should be a unicode object or ``NULL``;
49+
if ``NULL``, the :attr:`!__qualname__` attribute is set to the same value as
50+
the code object's :attr:`~codeobject.co_qualname` field.
4951
5052
.. versionadded:: 3.3
5153
@@ -62,11 +64,12 @@ There are a few functions specific to Python functions.
6264
6365
.. c:function:: PyObject* PyFunction_GetModule(PyObject *op)
6466
65-
Return a :term:`borrowed reference` to the *__module__* attribute of the
66-
function object *op*. It can be *NULL*.
67+
Return a :term:`borrowed reference` to the :attr:`~function.__module__`
68+
attribute of the :ref:`function object <user-defined-funcs>` *op*.
69+
It can be *NULL*.
6770
68-
This is normally a string containing the module name, but can be set to any
69-
other object by Python code.
71+
This is normally a :class:`string <str>` containing the module name,
72+
but can be set to any other object by Python code.
7073
7174
7275
.. c:function:: PyObject* PyFunction_GetDefaults(PyObject *op)

_sources/howto/annotations.rst.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ on an arbitrary object ``o``:
153153
unwrap it by accessing either ``o.__wrapped__`` or ``o.func`` as
154154
appropriate, until you have found the root unwrapped function.
155155
* If ``o`` is a callable (but not a class), use
156-
``o.__globals__`` as the globals when calling :func:`eval`.
156+
:attr:`o.__globals__ <function.__globals__>` as the globals when calling
157+
:func:`eval`.
157158

158159
However, not all string values used as annotations can
159160
be successfully turned into Python values by :func:`eval`.

_sources/howto/descriptor.rst.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,8 @@ Using the non-data descriptor protocol, a pure Python version of
13321332
The :func:`functools.update_wrapper` call adds a ``__wrapped__`` attribute
13331333
that refers to the underlying function. Also it carries forward
13341334
the attributes necessary to make the wrapper look like the wrapped
1335-
function: ``__name__``, ``__qualname__``, ``__doc__``, and ``__annotations__``.
1335+
function: :attr:`~function.__name__`, :attr:`~function.__qualname__`,
1336+
:attr:`~function.__doc__`, and :attr:`~function.__annotations__`.
13361337

13371338
.. testcode::
13381339
:hide:
@@ -1543,8 +1544,9 @@ chained together. In Python 3.11, this functionality was deprecated.
15431544
The :func:`functools.update_wrapper` call in ``ClassMethod`` adds a
15441545
``__wrapped__`` attribute that refers to the underlying function. Also
15451546
it carries forward the attributes necessary to make the wrapper look
1546-
like the wrapped function: ``__name__``, ``__qualname__``, ``__doc__``,
1547-
and ``__annotations__``.
1547+
like the wrapped function: :attr:`~function.__name__`,
1548+
:attr:`~function.__qualname__`, :attr:`~function.__doc__`,
1549+
and :attr:`~function.__annotations__`.
15481550

15491551

15501552
Member objects and __slots__

_sources/library/hmac.rst.txt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
This module implements the HMAC algorithm as described by :rfc:`2104`.
1515

1616

17-
.. function:: new(key, msg=None, digestmod='')
17+
.. function:: new(key, msg=None, digestmod)
1818

1919
Return a new hmac object. *key* is a bytes or bytearray object giving the
2020
secret key. If *msg* is present, the method call ``update(msg)`` is made.
@@ -27,10 +27,9 @@ This module implements the HMAC algorithm as described by :rfc:`2104`.
2727
Parameter *msg* can be of any type supported by :mod:`hashlib`.
2828
Parameter *digestmod* can be the name of a hash algorithm.
2929

30-
.. deprecated-removed:: 3.4 3.8
31-
MD5 as implicit default digest for *digestmod* is deprecated.
32-
The digestmod parameter is now required. Pass it as a keyword
33-
argument to avoid awkwardness when you do not have an initial msg.
30+
.. versionchanged:: 3.8
31+
The *digestmod* argument is now required. Pass it as a keyword
32+
argument to avoid awkwardness when you do not have an initial *msg*.
3433

3534

3635
.. function:: digest(key, msg, digest)
@@ -114,11 +113,9 @@ A hash object has the following attributes:
114113
.. versionadded:: 3.4
115114

116115

117-
.. deprecated:: 3.9
118-
119-
The undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, and
120-
``HMAC.outer`` are internal implementation details and will be removed in
121-
Python 3.10.
116+
.. versionchanged:: 3.10
117+
Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``,
118+
and ``HMAC.outer``.
122119

123120
This module also provides the following helper function:
124121

_sources/library/inspect.rst.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,10 @@ Classes and functions
12081208
* If ``obj`` is a class, ``globals`` defaults to
12091209
``sys.modules[obj.__module__].__dict__`` and ``locals`` defaults
12101210
to the ``obj`` class namespace.
1211-
* If ``obj`` is a callable, ``globals`` defaults to ``obj.__globals__``,
1211+
* If ``obj`` is a callable, ``globals`` defaults to
1212+
:attr:`obj.__globals__ <function.__globals__>`,
12121213
although if ``obj`` is a wrapped function (using
1213-
``functools.update_wrapper()``) it is first unwrapped.
1214+
:func:`functools.update_wrapper`) it is first unwrapped.
12141215

12151216
Calling ``get_annotations`` is best practice for accessing the
12161217
annotations dict of any object. See :ref:`annotations-howto` for

_sources/library/random.rst.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ Functions for sequences
220220
generated. For example, a sequence of length 2080 is the largest that
221221
can fit within the period of the Mersenne Twister random number generator.
222222

223-
.. deprecated-removed:: 3.9 3.11
224-
The optional parameter *random*.
223+
.. versionchanged:: 3.11
224+
Removed the optional parameter *random*.
225225

226226

227227
.. function:: sample(population, k, *, counts=None)
@@ -407,9 +407,9 @@ Alternative Generator
407407
Class that implements the default pseudo-random number generator used by the
408408
:mod:`random` module.
409409

410-
.. deprecated-removed:: 3.9 3.11
410+
.. versionchanged:: 3.11
411411
Formerly the *seed* could be any hashable object. Now it is limited to:
412-
:class:`NoneType`, :class:`int`, :class:`float`, :class:`str`,
412+
``None``, :class:`int`, :class:`float`, :class:`str`,
413413
:class:`bytes`, or :class:`bytearray`.
414414

415415
.. class:: SystemRandom([seed])

_sources/library/stdtypes.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5381,10 +5381,10 @@ Code objects are used by the implementation to represent "pseudo-compiled"
53815381
executable Python code such as a function body. They differ from function
53825382
objects because they don't contain a reference to their global execution
53835383
environment. Code objects are returned by the built-in :func:`compile` function
5384-
and can be extracted from function objects through their :attr:`__code__`
5385-
attribute. See also the :mod:`code` module.
5384+
and can be extracted from function objects through their
5385+
:attr:`~function.__code__` attribute. See also the :mod:`code` module.
53865386

5387-
Accessing ``__code__`` raises an :ref:`auditing event <auditing>`
5387+
Accessing :attr:`~function.__code__` raises an :ref:`auditing event <auditing>`
53885388
``object.__getattr__`` with arguments ``obj`` and ``"__code__"``.
53895389

53905390
.. index::

_sources/library/xmlrpc.server.rst.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ alone XML-RPC servers.
8484

8585
Register a function that can respond to XML-RPC requests. If *name* is given,
8686
it will be the method name associated with *function*, otherwise
87-
``function.__name__`` will be used. *name* is a string, and may contain
87+
:attr:`function.__name__` will be used. *name* is a string, and may contain
8888
characters not legal in Python identifiers, including the period character.
8989

9090
This method can also be used as a decorator. When used as a decorator,
9191
*name* can only be given as a keyword argument to register *function* under
92-
*name*. If no *name* is given, ``function.__name__`` will be used.
92+
*name*. If no *name* is given, :attr:`function.__name__` will be used.
9393

9494
.. versionchanged:: 3.7
9595
:meth:`register_function` can be used as a decorator.
@@ -298,12 +298,12 @@ requests sent to Python CGI scripts.
298298

299299
Register a function that can respond to XML-RPC requests. If *name* is given,
300300
it will be the method name associated with *function*, otherwise
301-
``function.__name__`` will be used. *name* is a string, and may contain
301+
:attr:`function.__name__` will be used. *name* is a string, and may contain
302302
characters not legal in Python identifiers, including the period character.
303303

304304
This method can also be used as a decorator. When used as a decorator,
305305
*name* can only be given as a keyword argument to register *function* under
306-
*name*. If no *name* is given, ``function.__name__`` will be used.
306+
*name*. If no *name* is given, :attr:`function.__name__` will be used.
307307

308308
.. versionchanged:: 3.7
309309
:meth:`register_function` can be used as a decorator.

_sources/reference/compound_stmts.rst.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,8 @@ except that the original function is not temporarily bound to the name ``func``.
12611261
A list of :ref:`type parameters <type-params>` may be given in square brackets
12621262
between the function's name and the opening parenthesis for its parameter list.
12631263
This indicates to static type checkers that the function is generic. At runtime,
1264-
the type parameters can be retrieved from the function's ``__type_params__``
1264+
the type parameters can be retrieved from the function's
1265+
:attr:`~function.__type_params__`
12651266
attribute. See :ref:`generic-functions` for more.
12661267

12671268
.. versionchanged:: 3.12
@@ -1868,8 +1869,8 @@ like ``TYPE_PARAMS_OF_ListOrSet`` are not actually bound at runtime.
18681869
are mappings.
18691870
18701871
.. [#] A string literal appearing as the first statement in the function body is
1871-
transformed into the function's ``__doc__`` attribute and therefore the
1872-
function's :term:`docstring`.
1872+
transformed into the function's :attr:`~function.__doc__` attribute and
1873+
therefore the function's :term:`docstring`.
18731874
18741875
.. [#] A string literal appearing as the first statement in the class body is
18751876
transformed into the namespace's ``__doc__`` item and therefore the class's

0 commit comments

Comments
 (0)