mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
(cherry-picked from commit e9707d3c3d
)
This commit is contained in:
parent
af7cf385a2
commit
ca11aec98c
9 changed files with 109 additions and 51 deletions
|
@ -37,7 +37,7 @@ There are a few functions specific to Python functions.
|
|||
The function's docstring and name are retrieved from the code object. *__module__*
|
||||
is retrieved from *globals*. The argument defaults, annotations and closure are
|
||||
set to ``NULL``. *__qualname__* is set to the same value as the code object's
|
||||
``co_qualname`` field.
|
||||
:attr:`~codeobject.co_qualname` field.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
|
||||
|
@ -45,7 +45,7 @@ There are a few functions specific to Python functions.
|
|||
As :c:func:`PyFunction_New`, but also allows setting the function object's
|
||||
``__qualname__`` attribute. *qualname* should be a unicode object or ``NULL``;
|
||||
if ``NULL``, the ``__qualname__`` attribute is set to the same value as the
|
||||
code object's ``co_qualname`` field.
|
||||
code object's :attr:`~codeobject.co_qualname` field.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ Importing Modules
|
|||
:class:`~importlib.machinery.SourceFileLoader` otherwise.
|
||||
|
||||
The module's :attr:`__file__` attribute will be set to the code object's
|
||||
:attr:`!co_filename`. If applicable, :attr:`__cached__` will also
|
||||
:attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also
|
||||
be set.
|
||||
|
||||
This function will reload the module if it was already imported. See
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue