|
|
@ -1643,7 +1643,7 @@ cursor.execute(<span class="hljs-string">'<query>'</span>, <dict/namedt |
|
|
|
|
|
|
|
<div><h3 id="encode-1">Encode</h3><pre><code class="python language-python hljs"><bytes> = <str>.encode(<span class="hljs-string">'utf-8'</span>) <span class="hljs-comment"># Or: bytes(<str>, 'utf-8')</span> |
|
|
|
<bytes> = bytes(<coll_of_ints>) <span class="hljs-comment"># Ints must be in range from 0 to 255.</span> |
|
|
|
<bytes> = <int>.to_bytes(<length>, byteorder=<span class="hljs-string">'big|little'</span>, signed=<span class="hljs-keyword">False</span>) |
|
|
|
<bytes> = <int>.to_bytes(n_bytes, byteorder=<span class="hljs-string">'big|little'</span>, signed=<span class="hljs-keyword">False</span>) |
|
|
|
<bytes> = bytes.fromhex(<span class="hljs-string">'<hex>'</span>) |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|