Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_type_attr_as_size
structseq.c
1 parent 1795fcc commit 69f5162Copy full SHA for 69f5162
1 file changed
Objects/structseq.c
@@ -28,7 +28,11 @@ static Py_ssize_t
28
get_type_attr_as_size(PyTypeObject *tp, PyObject *name)
29
{
30
PyObject *v = PyDict_GetItemWithError(_PyType_GetDict(tp), name);
31
- if (v == NULL && !PyErr_Occurred()) {
+
32
+ if (v == NULL) {
33
+ if (PyErr_Occurred()) {
34
+ return -1;
35
+ }
36
PyErr_Format(PyExc_TypeError,
37
"Missed attribute '%U' of type %s",
38
name, tp->tp_name);
0 commit comments