@@ -910,7 +910,7 @@ deque_rotate(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs)
910
910
}
911
911
912
912
PyDoc_STRVAR (rotate_doc ,
913
- "rotate(n)\n\n "
913
+ "rotate(n)\n"
914
914
"Rotate the deque *n* steps to the right (default ``n=1``). "
915
915
"If *n* is negative, rotates left." );
916
916
@@ -953,7 +953,7 @@ deque_reverse(dequeobject *deque, PyObject *unused)
953
953
}
954
954
955
955
PyDoc_STRVAR (reverse_doc ,
956
- "reverse()\n\n "
956
+ "reverse()\n"
957
957
"Reverse the elements of the deque *IN PLACE*." );
958
958
959
959
static PyObject *
@@ -993,7 +993,7 @@ deque_count(dequeobject *deque, PyObject *v)
993
993
}
994
994
995
995
PyDoc_STRVAR (count_doc ,
996
- "count(x) -> int\n\n "
996
+ "count(x) -> int\n"
997
997
"Count the number of deque elements equal to *x*." );
998
998
999
999
static int
@@ -1102,10 +1102,9 @@ deque_index(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs)
1102
1102
}
1103
1103
1104
1104
PyDoc_STRVAR (index_doc ,
1105
- "index(x, [start, [stop]]) -> int\n\n"
1106
- "Return the position of *x* in the deque "
1107
- "(at or after index *start* and before index *stop*). "
1108
- "Returns the first match or raises a ValueError if not found." );
1105
+ "index(x, [start, [stop]]) -> int\n"
1106
+ "Return first index of *x*. "
1107
+ "Raises ValueError if *x* is not present." );
1109
1108
1110
1109
/* insert(), remove(), and delitem() are implemented in terms of
1111
1110
rotate() for simplicity and reasonable performance near the end
@@ -1150,11 +1149,11 @@ deque_insert(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs)
1150
1149
}
1151
1150
1152
1151
PyDoc_STRVAR (insert_doc ,
1153
- "insert(i, x)\n\n "
1152
+ "insert(i, x)\n"
1154
1153
"Insert *x* into the deque at position *i*." );
1155
1154
1156
1155
PyDoc_STRVAR (remove_doc ,
1157
- "remove(x)\n\n "
1156
+ "remove(x)\n"
1158
1157
"Remove the first occurrence of *x*."
1159
1158
"If not found, raises a ValueError." );
1160
1159
@@ -1527,7 +1526,7 @@ deque_sizeof(dequeobject *deque, void *unused)
1527
1526
}
1528
1527
1529
1528
PyDoc_STRVAR (sizeof_doc ,
1530
- "__sizeof__() -> int\n\n "
1529
+ "__sizeof__() -> int\n"
1531
1530
"Size of the deque in memory, in bytes." );
1532
1531
1533
1532
static PyObject *
@@ -1563,7 +1562,7 @@ static PySequenceMethods deque_as_sequence = {
1563
1562
static PyObject * deque_iter (dequeobject * deque );
1564
1563
static PyObject * deque_reviter (dequeobject * deque , PyObject * Py_UNUSED (ignored ));
1565
1564
PyDoc_STRVAR (reversed_doc ,
1566
- "__reversed__()\n\n "
1565
+ "__reversed__()\n"
1567
1566
"Return a reverse iterator over the deque." );
1568
1567
1569
1568
static PyMethodDef deque_methods [] = {
@@ -1609,7 +1608,7 @@ static PyMethodDef deque_methods[] = {
1609
1608
};
1610
1609
1611
1610
PyDoc_STRVAR (deque_doc ,
1612
- "deque([iterable[, maxlen]]) -> collections.deque\n\n "
1611
+ "deque([iterable[, maxlen]]) -> collections.deque\n"
1613
1612
"A list-like sequence optimized for data accesses near its endpoints." );
1614
1613
1615
1614
static PyTypeObject deque_type = {
@@ -1989,7 +1988,7 @@ new_defdict(defdictobject *dd, PyObject *arg)
1989
1988
dd -> default_factory ? dd -> default_factory : Py_None , arg , NULL );
1990
1989
}
1991
1990
1992
- PyDoc_STRVAR (defdict_copy_doc , "copy() -> collections.deque\n\n "
1991
+ PyDoc_STRVAR (defdict_copy_doc , "copy() -> collections.deque\n"
1993
1992
"A shallow copy of the deque." );
1994
1993
1995
1994
static PyObject *
0 commit comments