mirror of https://github.com/python/cpython.git
The semantics of PyList_Check() and PyDict_Check() changed at 2.2, along
with most other concrete object checks, but the docs weren't brought into line. PyList_CheckExact() was added at 2.2 but never documented. backport candidate.
This commit is contained in:
parent
13cd8898d2
commit
43e5711309
|
@ -87,6 +87,7 @@ struct _dictobject {
|
|||
PyAPI_DATA(PyTypeObject) PyDict_Type;
|
||||
|
||||
#define PyDict_Check(op) PyObject_TypeCheck(op, &PyDict_Type)
|
||||
#define PyList_CheckExact(op) ((op)->ob_type == &PyDict_Type)
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyDict_New(void);
|
||||
PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
|
||||
|
|
Loading…
Reference in New Issue