@@ -6,9 +6,7 @@ PyDoc_STRVAR(OrderedDict_fromkeys__doc__,
66"fromkeys($type, /, iterable, value=None)\n"
77"--\n"
88"\n"
9- "New ordered dictionary with keys from S.\n"
10- "\n"
11- "If not specified, the value defaults to None." );
9+ "Create a new ordered dictionary with keys from iterable and values set to value." );
1210
1311#define ORDEREDDICT_FROMKEYS_METHODDEF \
1412 {"fromkeys", (PyCFunction)OrderedDict_fromkeys, METH_FASTCALL|METH_CLASS, OrderedDict_fromkeys__doc__},
@@ -39,7 +37,9 @@ PyDoc_STRVAR(OrderedDict_setdefault__doc__,
3937"setdefault($self, /, key, default=None)\n"
4038"--\n"
4139"\n"
42- "od.get(k,d), also set od[k]=d if k not in od." );
40+ "Insert key with a value of default if key is not in the dictionary.\n"
41+ "\n"
42+ "Return the value for key if key is in the dictionary, else default." );
4343
4444#define ORDEREDDICT_SETDEFAULT_METHODDEF \
4545 {"setdefault", (PyCFunction)OrderedDict_setdefault, METH_FASTCALL, OrderedDict_setdefault__doc__},
@@ -71,7 +71,7 @@ PyDoc_STRVAR(OrderedDict_popitem__doc__,
7171"popitem($self, /, last=True)\n"
7272"--\n"
7373"\n"
74- "Return (k, v) and remove a (key, value) pair.\n"
74+ "Remove and return a (key, value) pair from the dictionary .\n"
7575"\n"
7676"Pairs are returned in LIFO order if last is true or FIFO order if false." );
7777
@@ -103,10 +103,9 @@ PyDoc_STRVAR(OrderedDict_move_to_end__doc__,
103103"move_to_end($self, /, key, last=True)\n"
104104"--\n"
105105"\n"
106- "\" Move an existing element to the end (or beginning if last==False ).\n"
106+ "Move an existing element to the end (or beginning if last is false ).\n"
107107"\n"
108- " Raises KeyError if the element does not exist.\n"
109- " When last=True, acts like a fast version of self[key]=self.pop(key)." );
108+ "Raise KeyError if the element does not exist." );
110109
111110#define ORDEREDDICT_MOVE_TO_END_METHODDEF \
112111 {"move_to_end", (PyCFunction)OrderedDict_move_to_end, METH_FASTCALL, OrderedDict_move_to_end__doc__},
@@ -132,4 +131,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject **args, Py_ssize_t nargs,
132131exit :
133132 return return_value ;
134133}
135- /*[clinic end generated code: output=84ef19e7b5db0086 input=a9049054013a1b77]*/
134+ /*[clinic end generated code: output=a19a24ac37b42e5e input=a9049054013a1b77]*/
0 commit comments