@@ -311,11 +311,14 @@ counts, but the output will exclude results with counts of zero or less.
|
311 | 311 | |
312 | 312 | .. versionadded:: 2.7 |
313 | 313 | |
314 | | - .. method:: rotate(n) |
| 314 | + .. method:: rotate(n=1) |
315 | 315 | |
316 | 316 | Rotate the deque *n* steps to the right. If *n* is negative, rotate to |
317 | | - the left. Rotating one step to the right is equivalent to: |
318 | | - ``d.appendleft(d.pop())``. |
| 317 | + the left. |
| 318 | + |
| 319 | + When the deque is empty, rotating one step to the right is equivalent to |
| 320 | + ``d.appendleft(d.pop())``, and rotating one step to the left is |
| 321 | + equivalent to ``d.append(d.popleft())``. |
319 | 322 | |
320 | 323 | |
321 | 324 | Deque objects also provide one read-only attribute: |
|