Home | History | Annotate | Download | only in Objects

Lines Matching defs:dict

907     /* Clear the instance dict (if any), to break cycles involving only
938 clear_slots(), or DECREF the dict, or clear weakrefs. */
994 dict. */
1029 /* If we added a dict, DECREF it */
1033 PyObject *dict = *dictptr;
1034 if (dict != NULL) {
1035 Py_DECREF(dict);
1873 PyObject *dict;
1898 dict = *dictptr;
1899 if (dict == NULL)
1900 *dictptr = dict = PyDict_New();
1901 Py_XINCREF(dict);
1902 return dict;
1909 PyObject *dict;
1940 dict = *dictptr;
1943 Py_XDECREF(dict);
2093 PyObject *name, *bases, *dict;
2094 static char *kwlist[] = {"name", "bases", "dict", 0};
2126 /* Check arguments: (name, bases, dict) */
2130 &PyDict_Type, &dict))
2182 /* Check for a __slots__ sequence variable in dict, and count it */
2183 slots = PyDict_GetItemString(dict, "__slots__");
2299 /* Secondary bases may provide weakrefs or dict */
2388 /* Initialize tp_dict from passed-in dict */
2389 type->tp_dict = dict = PyDict_Copy(dict);
2390 if (dict == NULL) {
2395 /* Set __module__ in the dict */
2396 if (PyDict_GetItemString(dict, "__module__") == NULL) {
2401 if (PyDict_SetItemString(dict, "__module__",
2410 /* Set tp_doc to a copy of dict['__doc__'], if the latter is there
2415 PyObject *doc = PyDict_GetItemString(dict, "__doc__");
2430 tmp = PyDict_GetItemString(dict, "__new__");
2437 if (PyDict_SetItemString(dict, "__new__", tmp) < 0) {
2529 PyObject *mro, *res, *base, *dict;
2574 dict = ((PyClassObject *)base)->cl_dict;
2577 dict = ((PyTypeObject *)base)->tp_dict;
2579 assert(dict && PyDict_Check(dict));
2580 res = PyDict_GetItem(dict, name);
2769 "type(name, bases, dict) -> a new type");
2800 the dict, so that other objects caught in a reference cycle
2810 Not used; if it were, it would be a dict.
2815 class's dict; the cycle will be broken that way.
3666 PyObject *dict = type->tp_dict;
3671 if (PyDict_GetItemString(dict, meth->ml_name) &&
3694 err = PyDict_SetItemString(dict, meth->ml_name, descr);
3705 PyObject *dict = type->tp_dict;
3709 if (PyDict_GetItemString(dict, memb->name))
3714 if (PyDict_SetItemString(dict, memb->name, descr) < 0) {
3726 PyObject *dict = type->tp_dict;
3730 if (PyDict_GetItemString(dict, gsp->name))
3736 if (PyDict_SetItemString(dict, gsp->name, descr) < 0) {
3851 PyObject *dict = type->tp_dict;
3853 assert(dict != NULL);
3854 if (PyDict_GetItemString(dict, name) != NULL) {
4062 PyObject *dict, *bases;
4129 dict = type->tp_dict;
4130 if (dict == NULL) {
4131 dict = PyDict_New();
4132 if (dict == NULL)
4134 type->tp_dict = dict;
4903 object.__new__(dict). To do this, we check that the
6403 dict. */
6444 PyObject *ref, *subclasses, *dict;
6461 dict = subclass->tp_dict;
6462 if (dict != NULL && PyDict_Check(dict) &&
6463 PyDict_GetItem(dict, name) != NULL)
6504 PyObject *dict = type->tp_dict;
6516 if (PyDict_GetItem(dict, p->name_strobj))
6522 if (PyDict_SetItem(dict, p->name_strobj, Py_None) < 0)
6529 if (PyDict_SetItem(dict, p->name_strobj, descr) < 0) {
6606 PyObject *mro, *res, *tmp, *dict;
6629 dict = ((PyTypeObject *)tmp)->tp_dict;
6631 dict = ((PyClassObject *)tmp)->cl_dict;
6634 res = PyDict_GetItem(dict, name);