Home | History | Annotate | Download | only in Objects

Lines Matching defs:dict

879     /* There's no need to clear the instance dict (if any);

904 clear_slots(), or DECREF the dict, or clear weakrefs. */
958 dict. */
993 /* If we added a dict, DECREF it */
997 PyObject *dict = *dictptr;
998 if (dict != NULL) {
999 Py_DECREF(dict);
1825 PyObject *dict;
1850 dict = *dictptr;
1851 if (dict == NULL)
1852 *dictptr = dict = PyDict_New();
1853 Py_XINCREF(dict);
1854 return dict;
1861 PyObject *dict;
1892 dict = *dictptr;
1895 Py_XDECREF(dict);
2045 PyObject *name, *bases, *dict;
2046 static char *kwlist[] = {"name", "bases", "dict", 0};
2078 /* Check arguments: (name, bases, dict) */
2082 &PyDict_Type, &dict))
2141 /* Check for a __slots__ sequence variable in dict, and count it */
2142 slots = PyDict_GetItemString(dict, "__slots__");
2256 /* Secondary bases may provide weakrefs or dict */
2333 /* Initialize tp_dict from passed-in dict */
2334 type->tp_dict = dict = PyDict_Copy(dict);
2335 if (dict == NULL) {
2340 /* Set __module__ in the dict */
2341 if (PyDict_GetItemString(dict, "__module__") == NULL) {
2346 if (PyDict_SetItemString(dict, "__module__",
2353 /* Set tp_doc to a copy of dict['__doc__'], if the latter is there
2358 PyObject *doc = PyDict_GetItemString(dict, "__doc__");
2373 tmp = PyDict_GetItemString(dict, "__new__");
2380 PyDict_SetItemString(dict, "__new__", tmp);
2468 PyObject *mro, *res, *base, *dict;
2495 dict = ((PyClassObject *)base)->cl_dict;
2498 dict = ((PyTypeObject *)base)->tp_dict;
2500 assert(dict && PyDict_Check(dict));
2501 res = PyDict_GetItem(dict, name);
2676 "type(name, bases, dict) -> a new type");
2713 It is a dict, so the collector will call its tp_clear.
2716 Not used; if it were, it would be a dict.
2721 class's dict; the cycle will be broken that way.
3546 PyObject *dict = type->tp_dict;
3550 if (PyDict_GetItemString(dict, meth->ml_name) &&
3573 if (PyDict_SetItemString(dict, meth->ml_name, descr) < 0)
3583 PyObject *dict = type->tp_dict;
3587 if (PyDict_GetItemString(dict, memb->name))
3592 if (PyDict_SetItemString(dict, memb->name, descr) < 0)
3602 PyObject *dict = type->tp_dict;
3606 if (PyDict_GetItemString(dict, gsp->name))
3612 if (PyDict_SetItemString(dict, gsp->name, descr) < 0)
3725 PyObject *dict = type->tp_dict;
3727 assert(dict != NULL);
3728 if (PyDict_GetItemString(dict, name) != NULL) {
3936 PyObject *dict, *bases;
3997 dict = type->tp_dict;
3998 if (dict == NULL) {
3999 dict = PyDict_New();
4000 if (dict == NULL)
4002 type->tp_dict = dict;
4754 object.__new__(dict). To do this, we check that the
6270 dict. */
6311 PyObject *ref, *subclasses, *dict;
6328 dict = subclass->tp_dict;
6329 if (dict != NULL && PyDict_Check(dict) &&
6330 PyDict_GetItem(dict, name) != NULL)
6371 PyObject *dict = type->tp_dict;
6383 if (PyDict_GetItem(dict, p->name_strobj))
6389 if (PyDict_SetItem(dict, p->name_strobj, Py_None) < 0)
6396 if (PyDict_SetItem(dict, p->name_strobj, descr) < 0)
6471 PyObject *mro, *res, *tmp, *dict;
6494 dict = ((PyTypeObject *)tmp)->tp_dict;
6496 dict = ((PyClassObject *)tmp)->cl_dict;
6499 res = PyDict_GetItem(dict, name);