aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Objects/clinic/dictobject.c.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Objects/clinic/dictobject.c.h
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Objects/clinic/dictobject.c.h')
-rw-r--r--contrib/tools/python3/src/Objects/clinic/dictobject.c.h200
1 files changed, 100 insertions, 100 deletions
diff --git a/contrib/tools/python3/src/Objects/clinic/dictobject.c.h b/contrib/tools/python3/src/Objects/clinic/dictobject.c.h
index 51af72a2b8..7395e3bceb 100644
--- a/contrib/tools/python3/src/Objects/clinic/dictobject.c.h
+++ b/contrib/tools/python3/src/Objects/clinic/dictobject.c.h
@@ -9,7 +9,7 @@ PyDoc_STRVAR(dict_fromkeys__doc__,
"Create a new dictionary with keys from iterable and values set to value.");
#define DICT_FROMKEYS_METHODDEF \
- {"fromkeys", (PyCFunction)(void(*)(void))dict_fromkeys, METH_FASTCALL|METH_CLASS, dict_fromkeys__doc__},
+ {"fromkeys", (PyCFunction)(void(*)(void))dict_fromkeys, METH_FASTCALL|METH_CLASS, dict_fromkeys__doc__},
static PyObject *
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
@@ -21,15 +21,15 @@ dict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs)
PyObject *iterable;
PyObject *value = Py_None;
- if (!_PyArg_CheckPositional("fromkeys", nargs, 1, 2)) {
+ if (!_PyArg_CheckPositional("fromkeys", nargs, 1, 2)) {
goto exit;
}
- iterable = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- value = args[1];
-skip_optional:
+ iterable = args[0];
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ value = args[1];
+skip_optional:
return_value = dict_fromkeys_impl(type, iterable, value);
exit:
@@ -52,7 +52,7 @@ PyDoc_STRVAR(dict_get__doc__,
"Return the value for key if key is in the dictionary, else default.");
#define DICT_GET_METHODDEF \
- {"get", (PyCFunction)(void(*)(void))dict_get, METH_FASTCALL, dict_get__doc__},
+ {"get", (PyCFunction)(void(*)(void))dict_get, METH_FASTCALL, dict_get__doc__},
static PyObject *
dict_get_impl(PyDictObject *self, PyObject *key, PyObject *default_value);
@@ -64,15 +64,15 @@ dict_get(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
PyObject *key;
PyObject *default_value = Py_None;
- if (!_PyArg_CheckPositional("get", nargs, 1, 2)) {
+ if (!_PyArg_CheckPositional("get", nargs, 1, 2)) {
goto exit;
}
- key = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- default_value = args[1];
-skip_optional:
+ key = args[0];
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ default_value = args[1];
+skip_optional:
return_value = dict_get_impl(self, key, default_value);
exit:
@@ -88,7 +88,7 @@ PyDoc_STRVAR(dict_setdefault__doc__,
"Return the value for key if key is in the dictionary, else default.");
#define DICT_SETDEFAULT_METHODDEF \
- {"setdefault", (PyCFunction)(void(*)(void))dict_setdefault, METH_FASTCALL, dict_setdefault__doc__},
+ {"setdefault", (PyCFunction)(void(*)(void))dict_setdefault, METH_FASTCALL, dict_setdefault__doc__},
static PyObject *
dict_setdefault_impl(PyDictObject *self, PyObject *key,
@@ -101,93 +101,93 @@ dict_setdefault(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
PyObject *key;
PyObject *default_value = Py_None;
- if (!_PyArg_CheckPositional("setdefault", nargs, 1, 2)) {
+ if (!_PyArg_CheckPositional("setdefault", nargs, 1, 2)) {
goto exit;
}
- key = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- default_value = args[1];
-skip_optional:
+ key = args[0];
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ default_value = args[1];
+skip_optional:
return_value = dict_setdefault_impl(self, key, default_value);
exit:
return return_value;
}
-
-PyDoc_STRVAR(dict_pop__doc__,
-"pop($self, key, default=<unrepresentable>, /)\n"
-"--\n"
-"\n"
-"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n"
-"\n"
-"If key is not found, default is returned if given, otherwise KeyError is raised");
-
-#define DICT_POP_METHODDEF \
- {"pop", (PyCFunction)(void(*)(void))dict_pop, METH_FASTCALL, dict_pop__doc__},
-
-static PyObject *
-dict_pop_impl(PyDictObject *self, PyObject *key, PyObject *default_value);
-
-static PyObject *
-dict_pop(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
-{
- PyObject *return_value = NULL;
- PyObject *key;
- PyObject *default_value = NULL;
-
- if (!_PyArg_CheckPositional("pop", nargs, 1, 2)) {
- goto exit;
- }
- key = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- default_value = args[1];
-skip_optional:
- return_value = dict_pop_impl(self, key, default_value);
-
-exit:
- return return_value;
-}
-
-PyDoc_STRVAR(dict_popitem__doc__,
-"popitem($self, /)\n"
-"--\n"
-"\n"
-"Remove and return a (key, value) pair as a 2-tuple.\n"
-"\n"
-"Pairs are returned in LIFO (last-in, first-out) order.\n"
-"Raises KeyError if the dict is empty.");
-
-#define DICT_POPITEM_METHODDEF \
- {"popitem", (PyCFunction)dict_popitem, METH_NOARGS, dict_popitem__doc__},
-
-static PyObject *
-dict_popitem_impl(PyDictObject *self);
-
-static PyObject *
-dict_popitem(PyDictObject *self, PyObject *Py_UNUSED(ignored))
-{
- return dict_popitem_impl(self);
-}
-
-PyDoc_STRVAR(dict___reversed____doc__,
-"__reversed__($self, /)\n"
-"--\n"
-"\n"
-"Return a reverse iterator over the dict keys.");
-
-#define DICT___REVERSED___METHODDEF \
- {"__reversed__", (PyCFunction)dict___reversed__, METH_NOARGS, dict___reversed____doc__},
-
-static PyObject *
-dict___reversed___impl(PyDictObject *self);
-
-static PyObject *
-dict___reversed__(PyDictObject *self, PyObject *Py_UNUSED(ignored))
-{
- return dict___reversed___impl(self);
-}
-/*[clinic end generated code: output=4d98145508da8fa3 input=a9049054013a1b77]*/
+
+PyDoc_STRVAR(dict_pop__doc__,
+"pop($self, key, default=<unrepresentable>, /)\n"
+"--\n"
+"\n"
+"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n"
+"\n"
+"If key is not found, default is returned if given, otherwise KeyError is raised");
+
+#define DICT_POP_METHODDEF \
+ {"pop", (PyCFunction)(void(*)(void))dict_pop, METH_FASTCALL, dict_pop__doc__},
+
+static PyObject *
+dict_pop_impl(PyDictObject *self, PyObject *key, PyObject *default_value);
+
+static PyObject *
+dict_pop(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
+{
+ PyObject *return_value = NULL;
+ PyObject *key;
+ PyObject *default_value = NULL;
+
+ if (!_PyArg_CheckPositional("pop", nargs, 1, 2)) {
+ goto exit;
+ }
+ key = args[0];
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ default_value = args[1];
+skip_optional:
+ return_value = dict_pop_impl(self, key, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(dict_popitem__doc__,
+"popitem($self, /)\n"
+"--\n"
+"\n"
+"Remove and return a (key, value) pair as a 2-tuple.\n"
+"\n"
+"Pairs are returned in LIFO (last-in, first-out) order.\n"
+"Raises KeyError if the dict is empty.");
+
+#define DICT_POPITEM_METHODDEF \
+ {"popitem", (PyCFunction)dict_popitem, METH_NOARGS, dict_popitem__doc__},
+
+static PyObject *
+dict_popitem_impl(PyDictObject *self);
+
+static PyObject *
+dict_popitem(PyDictObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return dict_popitem_impl(self);
+}
+
+PyDoc_STRVAR(dict___reversed____doc__,
+"__reversed__($self, /)\n"
+"--\n"
+"\n"
+"Return a reverse iterator over the dict keys.");
+
+#define DICT___REVERSED___METHODDEF \
+ {"__reversed__", (PyCFunction)dict___reversed__, METH_NOARGS, dict___reversed____doc__},
+
+static PyObject *
+dict___reversed___impl(PyDictObject *self);
+
+static PyObject *
+dict___reversed__(PyDictObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return dict___reversed___impl(self);
+}
+/*[clinic end generated code: output=4d98145508da8fa3 input=a9049054013a1b77]*/