diff --git a/README.md b/README.md index 8c5097c..dcbc6d8 100644 --- a/README.md +++ b/README.md @@ -2088,11 +2088,11 @@ from collections import deque ``` ```python - = deque() # Also `maxlen=None`. + = deque() # Use `maxlen=` to set size limit. .appendleft() # Opposite element is dropped if full. .extendleft() # Passed collection gets reversed. -.rotate(n=1) # Rotates elements to the right. - = .popleft() # Raises IndexError if empty. +.rotate(n=1) # Last element becomes first. + = .popleft() # Raises IndexError if deque is empty. ``` diff --git a/index.html b/index.html index a5a655f..200fe46 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1717,11 +1717,11 @@ CompletedProcess(args=['bc', <deque> = deque(<collection>) # Also `maxlen=None`. +
<deque> = deque(<collection>)                  # Use `maxlen=<int>` to set size limit.
 <deque>.appendleft(<el>)                       # Opposite element is dropped if full.
 <deque>.extendleft(<collection>)               # Passed collection gets reversed.
-<deque>.rotate(n=1)                            # Rotates elements to the right.
-<el> = <deque>.popleft()                       # Raises IndexError if empty.
+<deque>.rotate(n=1)                            # Last element becomes first.
+<el> = <deque>.popleft()                       # Raises IndexError if deque is empty.
 

#Threading

CPython interpreter can only run a single thread at a time. Using multiple threads won't result in a faster execution, unless at least one of the threads contains an I/O operation.

from threading import Thread, Timer, RLock, Semaphore, Event, Barrier
 from concurrent.futures import ThreadPoolExecutor, as_completed
@@ -2932,7 +2932,7 @@ $ deactivate                  # Deactivates the activ