mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
PEP 3155 / issue #13448: Qualified name for classes and functions.
This commit is contained in:
parent
0e86a5842d
commit
86a36b500a
21 changed files with 322 additions and 43 deletions
|
@ -38,6 +38,16 @@ There are a few functions specific to Python functions.
|
|||
object, the argument defaults and closure are set to *NULL*.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
|
||||
|
||||
As :c:func:`PyFunction_New`, but also allows to set 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 its
|
||||
``__name__`` attribute.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyFunction_GetCode(PyObject *op)
|
||||
|
||||
Return the code object associated with the function object *op*.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue