Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd874ed

Browse files
committed
Fix the names of the classmethod and staticmethod constructors as passed to
PyArg_ParseTuple() as part of the format string.
1 parent a2bd8d3 commit cd874ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/funcobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ cm_init(PyObject *self, PyObject *args, PyObject *kwds)
486486
classmethod *cm = (classmethod *)self;
487487
PyObject *callable;
488488

489-
if (!PyArg_ParseTuple(args, "O:callable", &callable))
489+
if (!PyArg_ParseTuple(args, "O:classmethod", &callable))
490490
return -1;
491491
Py_INCREF(callable);
492492
cm->cm_callable = callable;
@@ -618,7 +618,7 @@ sm_init(PyObject *self, PyObject *args, PyObject *kwds)
618618
staticmethod *sm = (staticmethod *)self;
619619
PyObject *callable;
620620

621-
if (!PyArg_ParseTuple(args, "O:callable", &callable))
621+
if (!PyArg_ParseTuple(args, "O:staticmethod", &callable))
622622
return -1;
623623
Py_INCREF(callable);
624624
sm->sm_callable = callable;

0 commit comments

Comments
 (0)