<li><strong>If there are no numeric values before auto(), it returns 1.</strong></li>
<li><strong>Otherwise it returns an increment of the last numeric value.</strong></li>
</ul>
<pre><codeclass="python language-python hljs"><member> = <enum>.<member_name><spanclass="hljs-comment"># Returns a member.</span>
<member> = <enum>[<spanclass="hljs-string">'<member_name>'</span>] <spanclass="hljs-comment"># Returns a member or raises KeyError.</span>
<member> = <enum>(<value>) <spanclass="hljs-comment"># Returns a member or raises ValueError.</span>
<pre><codeclass="python language-python hljs"><member> = <enum>.<member_name><spanclass="hljs-comment"># Returns a member.</span>
<member> = <enum>[<spanclass="hljs-string">'<member_name>'</span>] <spanclass="hljs-comment"># Returns a member or raises KeyError.</span>
<member> = <enum>(<value>) <spanclass="hljs-comment"># Returns a member or raises ValueError.</span>
member_names = [a.name <spanclass="hljs-keyword">for</span> a <spanclass="hljs-keyword">in</span><enum>]
@ -1761,14 +1761,13 @@ db = connector.connect(host=<str>, user=<str>, password=<str>,
<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
<pre><codeclass="python language-python hljs"><deque>.appendleft(<el>) <spanclass="hljs-comment"># Opposite element is dropped if full.</span>
<deque>.appendleft(<el>) <spanclass="hljs-comment"># Opposite element is dropped if full.</span>
<el> = <deque>.popleft() <spanclass="hljs-comment"># Raises IndexError if empty.</span>
<div><h2id="introspection"><ahref="#introspection"name="introspection">#</a>Introspection</h2><p><strong>Inspecting code at runtime.</strong></p><div><h3id="variables">Variables</h3><pre><codeclass="python language-python hljs"><list> = dir() <spanclass="hljs-comment"># Returns names of variables in current scope.</span>
<dict> = locals()<spanclass="hljs-comment"># Returns dict of local variables. Also vars().</span>
<div><h2id="introspection"><ahref="#introspection"name="introspection">#</a>Introspection</h2><p><strong>Inspecting code at runtime.</strong></p><div><h3id="variables">Variables</h3><pre><codeclass="python language-python hljs"><list> = dir() <spanclass="hljs-comment"># Returns names of local variables (including functions).</span>
<dict> = vars() <spanclass="hljs-comment"># Returns dict of local variables. Also locals().</span>
<dict> = globals() <spanclass="hljs-comment"># Returns dict of global variables.</span>
<3d_array> = np.array(<Image>) <spanclass="hljs-comment"># Generates NumPy array from color image.</span>
<Image> = Image.fromarray(<array>) <spanclass="hljs-comment"># Generates image from NumPy array.</span>
</code></pre>
<div><h3id="modes-1">Modes</h3><ul>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'1'</span></code> - 1-bit pixels, black and white, stored with one pixel per byte.</strong></li>