diff --git a/README.md b/README.md index 9ce013a..23ed523 100644 --- a/README.md +++ b/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() ``` diff --git a/index.html b/index.html index 32df915..222d921 100644 --- a/index.html +++ b/index.html @@ -1717,8 +1717,10 @@ db = connector.connect(host=<str>, user=<str>, password=<str>, -<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 -<array> = array(<span class="hljs-string">'<typecode>'</span> [, <collection>]) +<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 +<array> = array(<span class="hljs-string">'<typecode>'</span>, <collection>) <span class="hljs-comment"># Array from collection of numbers.</span> +<array> = array(<span class="hljs-string">'<typecode>'</span>, <bytes>) <span class="hljs-comment"># Array from bytes object.</span> +<bytes> = <array>.tobytes() </code></pre></div>