Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,14 @@ or subtracting from an empty counter.
.. versionadded:: 3.2


.. method:: rotate(n)
.. method:: rotate(n=1)

Rotate the deque *n* steps to the right. If *n* is negative, rotate to
the left. Rotating one step to the right is equivalent to:
``d.appendleft(d.pop())``.
Rotate the deque *n* steps to the right. If *n* is negative, rotate
to the left.

When the deque is empty, rotating one step to the right is equivalent
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the deque is empty?

to ``d.appendleft(d.pop())``, and rotating one step to the left is
equivalent to ``d.append(d.popleft())``.


Deque objects also provide one read-only attribute:
Expand Down