From ec462fa51c3cdb59e293ab96910f7269ae4a230c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 2 Jul 2019 04:07:05 +0200 Subject: [PATCH] Small changes --- README.md | 6 ++---- index.html | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ab7e777..a06c855 100644 --- a/README.md +++ b/README.md @@ -468,7 +468,7 @@ Numbers = pow(, ) # Or: ** = abs() = round() - = round(, ±ndigits) + = round(, ±ndigits) # `round(126, -1) == 130` ``` ### Math @@ -1633,9 +1633,6 @@ from collections import deque ```python .appendleft() = .popleft() -``` - -```python .extendleft() # Collection gets reversed. .rotate(n=1) # Rotates elements to the right. ``` @@ -1675,6 +1672,7 @@ lock.release() #### Or: ```python +lock = RLock() with lock: ... ``` diff --git a/index.html b/index.html index 9fff237..dba35ad 100644 --- a/index.html +++ b/index.html @@ -532,7 +532,7 @@ to_exclusive = <range>.stop
<num>  = pow(<num>, <num>)            # Or: <num> ** <num>
 <real> = abs(<num>)
 <int>  = round(<real>)
-<real> = round(<real>, ±ndigits)
+<real> = round(<real>, ±ndigits)      # `round(126, -1) == 130`
 

Math

from math import e, pi, inf, nan
@@ -1412,8 +1412,7 @@ db.commit()
 
<deque>.appendleft(<el>)
 <el> = <deque>.popleft()
-
-
<deque>.extendleft(<collection>)  # Collection gets reversed.
+<deque>.extendleft(<collection>)  # Collection gets reversed.
 <deque>.rotate(n=1)               # Rotates elements to the right.
 
>>> a = deque([1, 2, 3], maxlen=3)
@@ -1440,7 +1439,8 @@ lock.acquire()
 lock.release()
 

Or:

-
with lock:
+
lock = RLock()
+with lock:
     ...
 

#Introspection