Skip to content

Commit 17498dc

Browse files
committed
Bytes
1 parent 767b20b commit 17498dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ Bytes
18461846
```python
18471847
<bytes> = <str>.encode('utf-8') # Or: bytes(<str>, 'utf-8')
18481848
<bytes> = bytes(<coll_of_ints>) # Ints must be in range from 0 to 255.
1849-
<bytes> = <int>.to_bytes(<length>, byteorder='big|little', signed=False)
1849+
<bytes> = <int>.to_bytes(n_bytes, byteorder='big|little', signed=False)
18501850
<bytes> = bytes.fromhex('<hex>')
18511851
```
18521852

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@
16431643

16441644
<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>
16451645
&lt;bytes&gt; = bytes(&lt;coll_of_ints&gt;) <span class="hljs-comment"># Ints must be in range from 0 to 255.</span>
1646-
&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>)
1646+
&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>)
16471647
&lt;bytes&gt; = bytes.fromhex(<span class="hljs-string">'&lt;hex&gt;'</span>)
16481648
</code></pre></div>
16491649

0 commit comments

Comments
 (0)