<li><strong><codeclass="python hljs"><spanclass="hljs-string">'FileNotFoundError'</span></code> can be risen when reading with <codeclass="python hljs"><spanclass="hljs-string">'r'</span></code> or <codeclass="python hljs"><spanclass="hljs-string">'r+'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'FileExistsError'</span></code> can be risen when writing with <codeclass="python hljs"><spanclass="hljs-string">'x'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'IsADirectoryError'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'PermissionError'</span></code> can be risen by any.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'OSError'</span></code> is the parent class of all listed exceptions.</strong></li>
</ul><div><h3id="file">File</h3><pre><codeclass="python language-python hljs"><file>.seek(<spanclass="hljs-number">0</span>) <spanclass="hljs-comment"># Moves to the start of the file.</span>
</ul></div><div><h3id="file">File</h3><pre><codeclass="python language-python hljs"><file>.seek(<spanclass="hljs-number">0</span>) <spanclass="hljs-comment"># Moves to the start of the file.</span>
<file>.seek(offset) <spanclass="hljs-comment"># Moves 'offset' chars/bytes from the start.</span>
<file>.seek(<spanclass="hljs-number">0</span>, <spanclass="hljs-number">2</span>) <spanclass="hljs-comment"># Moves to the end of the file.</span>
@ -1724,11 +1724,26 @@ db = connector.connect(host=<str>, user=<str>, password=<str>,
</code></pre></div>
<div><h2id="memoryview"><ahref="#memoryview"name="memoryview">#</a>Memory View</h2><p><strong>Used for accessing the internal data of an object that supports the buffer protocol.</strong></p><pre><codeclass="python language-python hljs"><mview> = memoryview(<bytes> / <bytearray> / <array>)
<mview>.release() <spanclass="hljs-comment"># Releases the buffer.</span>
<num> = <mview>[<index>] <spanclass="hljs-comment"># Can be int or float.</span>
<mview> = <mview>[<slice>] <spanclass="hljs-comment"># Mview with rearanged elements.</span>
<mview> = <mview>.cast(<spanclass="hljs-string">'<typecode>'</span>) <spanclass="hljs-comment"># Cast a memoryview to a new format.</span>
<mview>.release() <spanclass="hljs-comment"># Releases the buffer.</span>
<div><h2id="deque"><ahref="#deque"name="deque">#</a>Deque</h2><p><strong>A thread-safe list with efficient appends and pops from either side. Pronounced "deck".</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">from</span> collections <spanclass="hljs-keyword">import</span> deque
<div><h2id="table"><ahref="#table"name="table">#</a>Table</h2><div><h4id="printsacsvfileasanasciitable">Prints a CSV file as an ASCII table:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install tabulate</span>