Browse Source

Bytes

pull/42/head
Jure Šorn 5 years ago
parent
commit
17498dce01
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -1846,7 +1846,7 @@ Bytes
```python
<bytes> = <str>.encode('utf-8') # Or: bytes(<str>, 'utf-8')
<bytes> = bytes(<coll_of_ints>) # Ints must be in range from 0 to 255.
<bytes> = <int>.to_bytes(<length>, byteorder='big|little', signed=False)
<bytes> = <int>.to_bytes(n_bytes, byteorder='big|little', signed=False)
<bytes> = bytes.fromhex('<hex>')
```

2
index.html

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

Loading…
Cancel
Save