Staging
v0.5.1
https://github.com/python/cpython
Revision c598a04dd29b89ad072245ddaf738badcfb41ac7 authored by idanw206 on 06 December 2020, 09:59:36 UTC, committed by GitHub on 06 December 2020, 09:59:36 UTC
Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function
1 parent 804d689
Raw File
Tip revision: c598a04dd29b89ad072245ddaf738badcfb41ac7 authored by idanw206 on 06 December 2020, 09:59:36 UTC
bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH23613)
Tip revision: c598a04
iterobject.h
#ifndef Py_ITEROBJECT_H
#define Py_ITEROBJECT_H
/* Iterators (the basic kind, over a sequence) */
#ifdef __cplusplus
extern "C" {
#endif

PyAPI_DATA(PyTypeObject) PySeqIter_Type;
PyAPI_DATA(PyTypeObject) PyCallIter_Type;

#define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type)

PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);


#define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type)

PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);

#ifdef __cplusplus
}
#endif
#endif /* !Py_ITEROBJECT_H */

back to top