We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f33eced commit 52f7458Copy full SHA for 52f7458
Doc/library/collections.rst
@@ -509,11 +509,14 @@ or subtracting from an empty counter.
509
.. versionadded:: 3.2
510
511
512
- .. method:: rotate(n)
+ .. method:: rotate(n=1)
513
514
- Rotate the deque *n* steps to the right. If *n* is negative, rotate to
515
- the left. Rotating one step to the right is equivalent to:
516
- ``d.appendleft(d.pop())``.
+ Rotate the deque *n* steps to the right. If *n* is negative, rotate
+ to the left.
+
517
+ When the deque is empty, rotating one step to the right is equivalent
518
+ to ``d.appendleft(d.pop())``, and rotating one step to the left is
519
+ equivalent to ``d.append(d.popleft())``.
520
521
522
Deque objects also provide one read-only attribute:
0 commit comments