diff --git a/README.md b/README.md index 5f2e5ce..ea1af9d 100644 --- a/README.md +++ b/README.md @@ -1997,8 +1997,8 @@ Struct ```python from struct import pack, unpack - = pack('', [, ...]) # Packs objects according to format string. - = unpack('', ) # Use iter_unpack() to get iterator of tuples. + = pack('', [, ...]) # Packs numbers according to format string. + = unpack('', ) # Use iter_unpack() to get iterator of tuples. ``` ```python @@ -2259,7 +2259,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed .join() # Waits for the thread to finish executing. ``` * **Use `'kwargs='` to pass keyword arguments to the function.** -* **Use `'daemon=True'`, or program won't be able to exit while the thread is alive.** +* **Use `'daemon=True'`, or the program won't be able to exit while the thread is alive.** ### Lock ```python @@ -2295,7 +2295,7 @@ with : # Enters the block by calling acq = ThreadPoolExecutor(max_workers=None) # Or: `with ThreadPoolExecutor() as : ...` = .map(, , ...) # Multithreaded and non-lazy map(). Keeps order. = .submit(, , ...) # Creates a thread and returns its Future obj. -.shutdown() # Blocks until all threads finish executing. +.shutdown() # Waits for all submitted threads to finish. ``` ```python diff --git a/index.html b/index.html index 869e1e8..7536836 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
- +
@@ -1430,8 +1430,8 @@ args = p.parse_args() <Path> = <Path>.parent # Returns Path without the final component. <str> = <Path>.name # Returns final component as a string. -<str> = <Path>.stem # Returns final component w/o last extension. -<str> = <Path>.suffix # Returns last extension prepended with a dot. +<str> = <Path>.suffix # Returns name's last extension (e.g. '.py'). +<str> = <Path>.stem # Returns name without its last extension. <tup.> = <Path>.parts # Returns all path's components as strings.
<iter> = <Path>.iterdir()           # Returns directory contents as Path objects.
@@ -1591,8 +1591,8 @@ CompletedProcess(args=['bc', '<query>')                  # depending on whether any exception occurred.
 
-

Placeholders

<conn>.execute('<query>', <list/tuple>)        # Replaces '?'s in query with values.
-<conn>.execute('<query>', <dict/namedtuple>)   # Replaces ':<key>'s with values.
+

Placeholders

<conn>.execute('<query>', <list/tuple>)        # Replaces every '?' with an item.
+<conn>.execute('<query>', <dict/namedtuple>)   # Replaces every ':<key>' with a value.
 <conn>.executemany('<query>', <coll_of_coll>)  # Runs execute() multiple times.
 
@@ -1612,7 +1612,7 @@ CompletedProcess(args=['bc', from sqlalchemy import create_engine, text <engine> = create_engine('<url>') # Url: 'dialect://user:password@host/dbname'. <conn> = <engine>.connect() # Creates a connection. Also <conn>.close(). -<cursor> = <conn>.execute(text('<query>'), …) # `<dict>`. Replaces ':<key>'s with values. +<cursor> = <conn>.execute(text('<query>'), …) # `<dict>`. Replaces every ':<key>' with value. with <conn>.begin(): ... # Exits the block with commit or rollback.
@@ -1660,8 +1660,8 @@ CompletedProcess(args=['bc', from struct import pack, unpack -<bytes> = pack('<format>', <el_1> [, ...]) # Packs objects according to format string. -<tuple> = unpack('<format>', <bytes>) # Use iter_unpack() to get iterator of tuples. +<bytes> = pack('<format>', <num_1> [, ...]) # Packs numbers according to format string. +<tuple> = unpack('<format>', <bytes>) # Use iter_unpack() to get iterator of tuples. @@ -1865,7 +1865,7 @@ delattr(<obj>, '<name>')
  • Use 'kwargs=<dict>' to pass keyword arguments to the function.
  • -
  • Use 'daemon=True', or program won't be able to exit while the thread is alive.
  • +
  • Use 'daemon=True', or the program won't be able to exit while the thread is alive.

Lock

<lock> = Lock/RLock()                          # RLock can only be released by acquirer.
 <lock>.acquire()                               # Waits for the lock to be available.
@@ -1891,7 +1891,7 @@ delattr(<obj>, '<name>')
 

Thread Pool Executor

<Exec> = ThreadPoolExecutor(max_workers=None)  # Or: `with ThreadPoolExecutor() as <name>: ...`
 <iter> = <Exec>.map(<func>, <args_1>, ...)     # Multithreaded and non-lazy map(). Keeps order.
 <Futr> = <Exec>.submit(<func>, <arg_1>, ...)   # Creates a thread and returns its Future obj.
-<Exec>.shutdown()                              # Blocks until all threads finish executing.
+<Exec>.shutdown()                              # Waits for all submitted threads to finish.
 
<bool> = <Future>.done()                       # Checks if the thread has finished executing.
@@ -2940,7 +2940,7 @@ $ deactivate                # Deactivates the active