Skip to content

Conversation

@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Feb 2, 2018

.. 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:
Copy link
Member

Choose a reason for hiding this comment

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

While we are here, is it worth to add an example for rotating one step to the left?

@rhettinger rhettinger merged commit 589c718 into python:master Feb 3, 2018
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 3, 2018
(cherry picked from commit 589c718)

Co-authored-by: Raymond Hettinger <[email protected]>
@bedevere-bot
Copy link

GH-5514 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 3, 2018
(cherry picked from commit 589c718)

Co-authored-by: Raymond Hettinger <[email protected]>
@bedevere-bot
Copy link

GH-5515 is a backport of this pull request to the 3.6 branch.

@rhettinger rhettinger deleted the rotate-default branch February 3, 2018 16:49
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
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?

rhettinger added a commit that referenced this pull request Feb 3, 2018
(cherry picked from commit 589c718)

Co-authored-by: Raymond Hettinger <[email protected]>
rhettinger added a commit that referenced this pull request Feb 3, 2018
(cherry picked from commit 589c718)

Co-authored-by: Raymond Hettinger <[email protected]>
rhettinger added a commit that referenced this pull request Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants