diff --git a/README.md b/README.md index 2e1987a..9dd19e5 100644 --- a/README.md +++ b/README.md @@ -1279,7 +1279,7 @@ class MySequence: ``` #### Discrepancies between glossary definitions and abstract base classes: -* **Glossary defines iterable as any object with iter() or getitem() and sequence as any object with len() and getitem(). It does not define collection.** +* **Glossary defines iterable as any object with iter() or getitem() and sequence as any object with getitem() and len(). It does not define collection.** * **Passing ABC Iterable to isinstance() or issubclass() checks whether object/class has method iter(), while ABC Collection checks for iter(), contains() and len().** ### ABC Sequence @@ -1946,7 +1946,7 @@ Bytes ```python = bytes() # Ints must be in range from 0 to 255. = bytes(, 'utf-8') # Or: .encode('utf-8') - = .to_bytes(n_bytes, …) # `byteorder='big/little', signed=False`. + = .to_bytes(n_bytes, …) # `byteorder='little/big', signed=False`. = bytes.fromhex('') # Hex pairs can be separated by whitespaces. ``` @@ -1954,7 +1954,7 @@ Bytes ```python = list() # Returns ints in range from 0 to 255. = str(, 'utf-8') # Or: .decode('utf-8') - = int.from_bytes(, …) # `byteorder='big/little', signed=False`. + = int.from_bytes(, …) # `byteorder='little/big', signed=False`. '' = .hex() # Returns hex pairs. Accepts `sep=`. ``` @@ -2054,7 +2054,7 @@ Memory View ```python = list() # Returns a list of ints or floats. = str(, 'utf-8') # Treats mview as a bytes object. - = int.from_bytes(, …) # `byteorder='big/little', signed=False`. + = int.from_bytes(, …) # `byteorder='little/big', signed=False`. '' = .hex() # Treats mview as a bytes object. ``` @@ -2097,7 +2097,7 @@ from concurrent.futures import ThreadPoolExecutor ### Lock ```python - = RLock() # Lock that can only be released by the owner. + = RLock() # Lock that can only be released by acquirer. .acquire() # Waits for the lock to be available. .release() # Makes the lock available again. ``` diff --git a/index.html b/index.html index 413b4c5..bc64634 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1098,7 +1098,7 @@ Hello World!

Discrepancies between glossary definitions and abstract base classes:

    -
  • Glossary defines iterable as any object with iter() or getitem() and sequence as any object with len() and getitem(). It does not define collection.
  • +
  • Glossary defines iterable as any object with iter() or getitem() and sequence as any object with getitem() and len(). It does not define collection.
  • Passing ABC Iterable to isinstance() or issubclass() checks whether object/class has method iter(), while ABC Collection checks for iter(), contains() and len().
@@ -1618,13 +1618,13 @@ CompletedProcess(args=['bc', Encode
<bytes> = bytes(<coll_of_ints>)          # Ints must be in range from 0 to 255.
 <bytes> = bytes(<str>, 'utf-8')          # Or: <str>.encode('utf-8')
-<bytes> = <int>.to_bytes(n_bytes, …)     # `byteorder='big/little', signed=False`.
+<bytes> = <int>.to_bytes(n_bytes, …)     # `byteorder='little/big', signed=False`.
 <bytes> = bytes.fromhex('<hex>')         # Hex pairs can be separated by whitespaces.
 

Decode

<list>  = list(<bytes>)                  # Returns ints in range from 0 to 255.
 <str>   = str(<bytes>, 'utf-8')          # Or: <bytes>.decode('utf-8')
-<int>   = int.from_bytes(<bytes>, …)     # `byteorder='big/little', signed=False`.
+<int>   = int.from_bytes(<bytes>, …)     # `byteorder='little/big', signed=False`.
 '<hex>' = <bytes>.hex()                  # Returns hex pairs. Accepts `sep=<str>`.
 
@@ -1708,7 +1708,7 @@ CompletedProcess(args=['bc', <list> = list(<mview>) # Returns a list of ints or floats. <str> = str(<mview>, 'utf-8') # Treats mview as a bytes object. -<int> = int.from_bytes(<mview>, …) # `byteorder='big/little', signed=False`. +<int> = int.from_bytes(<mview>, …) # `byteorder='little/big', signed=False`. '<hex>' = <mview>.hex() # Treats mview as a bytes object.

#Deque

A thread-safe list with efficient appends and pops from either side. Pronounced "deck".

from collections import deque
@@ -1739,7 +1739,7 @@ CompletedProcess(args=['bc', 'kwargs=<dict>' to pass keyword arguments to the function.
 
  • Use 'daemon=True', or the program will not be able to exit while the thread is alive.
  • -

    Lock

    <lock> = RLock()                               # Lock that can only be released by the owner.
    +

    Lock

    <lock> = RLock()                               # Lock that can only be released by acquirer.
     <lock>.acquire()                               # Waits for the lock to be available.
     <lock>.release()                               # Makes the lock available again.
     
    @@ -2905,7 +2905,7 @@ $ pyinstaller script.py --add-data '<path>:.'