mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Implement PEP 3121: new module initialization and finalization API.
This commit is contained in:
parent
cdf94635d7
commit
1a21451b1d
113 changed files with 2230 additions and 855 deletions
|
@ -188,7 +188,7 @@ static PyMemberDef meth_members[] = {
|
|||
static PyObject *
|
||||
meth_repr(PyCFunctionObject *m)
|
||||
{
|
||||
if (m->m_self == NULL)
|
||||
if (m->m_self == NULL || PyModule_Check(m->m_self))
|
||||
return PyUnicode_FromFormat("<built-in function %s>",
|
||||
m->m_ml->ml_name);
|
||||
return PyUnicode_FromFormat("<built-in method %s of %s object at %p>",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue