diff --git a/README.md b/README.md index 16a7a11..09d0daf 100644 --- a/README.md +++ b/README.md @@ -1861,16 +1861,16 @@ Bytes ### Encode ```python - = bytes(, 'utf-8') # Or: .encode('utf-8') = 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) = bytes.fromhex('') ``` ### Decode ```python - = str(, 'utf-8') # Or: .decode('utf-8') = list() # Returns ints in range from 0 to 255. + = str(, 'utf-8') # Or: .decode('utf-8') = int.from_bytes(, byteorder='big|little', signed=False) '' = .hex() ``` diff --git a/index.html b/index.html index 9381133..dfddda6 100644 --- a/index.html +++ b/index.html @@ -1658,14 +1658,14 @@ db = connector.connect(host=<str>, user=<str>, password=<str>, -

Encode

<bytes> = bytes(<str>, 'utf-8')          # Or: <str>.encode('utf-8')
-<bytes> = bytes(<coll_of_ints>)          # Ints must be in range from 0 to 255.
+

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> = bytes.fromhex('<hex>')
 
-

Decode

<str>   = str(<bytes>, 'utf-8')          # Or: <bytes>.decode('utf-8')
-<list>  = list(<bytes>)                  # Returns ints in range from 0 to 255.
+

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)
 '<hex>' = <bytes>.hex()