Lines Matching defs:value
38 4. have the value stored for each key be a (value, node) pair, and adjust
532 PyObject *value = NULL;
536 ix = _Py_dict_lookup((PyDictObject *)od, key, hash, &value);
915 value: object = None
917 Create a new ordered dictionary with keys from iterable and values set to value.
921 OrderedDict_fromkeys_impl(PyTypeObject *type, PyObject *seq, PyObject *value)
924 return _PyDict_FromKeys((PyObject *)type, seq, value);
991 Insert key with a value of default if key is not in the dictionary.
993 Return the value for key if key is in the dictionary, else default.
1041 PyObject *value = NULL;
1052 /* Now delete the value from the dict. */
1053 value = _PyDict_Pop_KnownHash(od, key, hash, failobj);
1055 else if (value == NULL && !PyErr_Occurred()) {
1056 /* Apply the fallback value, if necessary. */
1058 value = failobj;
1066 return value;
1076 od.pop(key[,default]) -> v, remove specified key and return the corresponding value.
1101 Remove and return a (key, value) pair from the dictionary.
1110 PyObject *key, *value, *item = NULL;
1123 value = _odict_popkey_hash((PyObject *)self, key, NULL, _odictnode_HASH(node));
1124 if (value == NULL)
1126 item = PyTuple_Pack(2, key, value);
1128 Py_DECREF(value);
1200 PyObject *value = _odictnode_VALUE(node, od);
1201 if (value == NULL) {
1206 if (_PyODict_SetItem_KnownHash((PyObject *)od_copy, key, value,
1214 PyObject *value = PyObject_GetItem((PyObject *)od,
1216 if (value == NULL)
1219 _odictnode_KEY(node), value);
1220 Py_DECREF(value);
1395 PyObject *value = _odictnode_VALUE(node, self);
1396 if (value == NULL) {
1401 pair = PyTuple_Pack(2, key, value);
1597 _PyODict_SetItem_KnownHash(PyObject *od, PyObject *key, PyObject *value,
1600 int res = _PyDict_SetItem_KnownHash(od, key, value, hash);
1604 /* Revert setting the value on the dict */
1615 PyODict_SetItem(PyObject *od, PyObject *key, PyObject *value)
1620 return _PyODict_SetItem_KnownHash(od, key, value, hash);
1731 PyObject *result, *value;
1742 value = PyODict_GetItem((PyObject *)di->di_odict, key); /* borrowed */
1743 if (value == NULL) {
1749 Py_INCREF(value);
1754 return value;
1776 Py_DECREF(value);
1782 PyTuple_SET_ITEM(result, 1, value); /* steals reference */
2144 PyObject *key = NULL, *value = NULL;
2157 value = PyIter_Next(pair_iterator);
2158 if (value == NULL) {
2161 "need more than 1 value to unpack");
2175 res = PyObject_SetItem(self, key, value);
2181 Py_XDECREF(value);
2223 PyObject *value = PyObject_GetItem(arg, key);
2224 if (value != NULL) {
2225 res = PyObject_SetItem(self, key, value);
2226 Py_DECREF(value);