mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30: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
|
|
@ -31,6 +31,7 @@ typedef struct {
|
|||
PyObject *func_weakreflist; /* List of weak references */
|
||||
PyObject *func_module; /* The __module__ attribute, can be anything */
|
||||
PyObject *func_annotations; /* Annotations, a dict or NULL */
|
||||
PyObject *func_qualname; /* The qualified name */
|
||||
|
||||
/* Invariant:
|
||||
* func_closure contains the bindings for func_code->co_freevars, so
|
||||
|
|
@ -44,6 +45,7 @@ PyAPI_DATA(PyTypeObject) PyFunction_Type;
|
|||
#define PyFunction_Check(op) (Py_TYPE(op) == &PyFunction_Type)
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyFunction_NewWithQualName(PyObject *, PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue