Browse Source

Array

pull/44/head
Jure Šorn 5 years ago
parent
commit
152715ff11
2 changed files with 8 additions and 4 deletions
  1. 6
      README.md
  2. 6
      index.html

6
README.md

@ -1931,11 +1931,13 @@ b'\x00\x01\x00\x02\x00\x00\x00\x03'
Array
-----
**List that can only hold numbers of predefined type. Available types and their sizes in bytes are listed above.**
**List that can only hold numbers of a predefined type. Available types and their sizes in bytes are listed above.**
```python
from array import array
<array> = array('<typecode>' [, <collection>])
<array> = array('<typecode>', <collection>) # Array from collection of numbers.
<array> = array('<typecode>', <bytes>) # Array from bytes object.
<bytes> = <array>.tobytes()
```

6
index.html

@ -1717,8 +1717,10 @@ db = connector.connect(host=&lt;str&gt;, user=&lt;str&gt;, password=&lt;str&gt;,
<div><h2 id="array"><a href="#array" name="array">#</a>Array</h2><p><strong>List that can only hold numbers of predefined type. Available types and their sizes in bytes are listed above.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> array <span class="hljs-keyword">import</span> array
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span> [, &lt;collection&gt;])
<div><h2 id="array"><a href="#array" name="array">#</a>Array</h2><p><strong>List that can only hold numbers of a predefined type. Available types and their sizes in bytes are listed above.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> array <span class="hljs-keyword">import</span> array
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;collection&gt;) <span class="hljs-comment"># Array from collection of numbers.</span>
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;bytes&gt;) <span class="hljs-comment"># Array from bytes object.</span>
&lt;bytes&gt; = &lt;array&gt;.tobytes()
</code></pre></div>

Loading…
Cancel
Save