@ -1013,10 +1013,10 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
<li><strong>Function field() is needed because <codeclass="python hljs"><spanclass="hljs-string">'<attr_name>: list = []'</span></code> would make a list that is shared among all instances.</strong></li>
<li><strong>Function field() is needed because <codeclass="python hljs"><spanclass="hljs-string">'<attr_name>: list = []'</span></code> would make a list that is shared among all instances.</strong></li>
<li><strong>Default_factory can be any <ahref="#callable">callable</a>.</strong></li>
<li><strong>Default_factory can be any <ahref="#callable">callable</a>.</strong></li>
<div><h3id="slots">Slots</h3><p><strong>Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-class"><spanclass="hljs-keyword">class</span><spanclass="hljs-title">MyClassWithSlots</span>:</span>
<div><h3id="slots">Slots</h3><p><strong>Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-class"><spanclass="hljs-keyword">class</span><spanclass="hljs-title">MyClassWithSlots</span>:</span>
param_kinds = [a.kind <spanclass="hljs-keyword">for</span> a <spanclass="hljs-keyword">in</span><sig>.parameters.values()]
param_kinds = [a.kind <spanclass="hljs-keyword">for</span> a <spanclass="hljs-keyword">in</span><sig>.parameters.values()]
</code></pre></div>
</code></pre></div>
<div><h2id="metaprograming"><ahref="#metaprograming"name="metaprograming">#</a>Metaprograming</h2><p><strong>Code that generates code.</strong></p><div><h3id="type-1">Type</h3><p><strong>Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.</strong></p><pre><codeclass="python language-python hljs"><codeclass="python language-python hljs"><class> = type(<spanclass="hljs-string">'<class_name>'</span>, <parents_tuple>, <attributes_dict>)</code></code></pre></div></div>
<div><h2id="metaprograming"><ahref="#metaprograming"name="metaprograming">#</a>Metaprograming</h2><p><strong>Code that generates code.</strong></p><div><h3id="type-1">Type</h3><p><strong>Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.</strong></p><pre><codeclass="python language-python hljs"><class> = type(<spanclass="hljs-string">'<class_name>'</span>, <parents_tuple>, <attributes_dict>)</code></pre></div></div>
$ pyinstaller script.py <spanclass="hljs-comment"># Compiles into './dist/script' directory.</span>
$ pyinstaller script.py <spanclass="hljs-comment"># Compiles into './dist/script' directory.</span>
$ pyinstaller script.py --onefile <spanclass="hljs-comment"># Compiles into './dist/script' console app.</span>
$ pyinstaller script.py --onefile <spanclass="hljs-comment"># Compiles into './dist/script' console app.</span>
$ pyinstaller script.py --windowed <spanclass="hljs-comment"># Compiles into './dist/script' windowed app.</span>
$ pyinstaller script.py --windowed <spanclass="hljs-comment"># Compiles into './dist/script' windowed app.</span>
$ pyinstaller script.py --add-data '<path>:.' <spanclass="hljs-comment"># Adds file to the root of the executable.</span>
$ pyinstaller script.py --add-data '<path>:.' <spanclass="hljs-comment"># Adds file to the root of the executable.</span>
</code></code></pre></div>
</code></pre></div>
<ul>
<ul>
<li><strong>File paths need to be updated to <codeclass="python hljs"><spanclass="hljs-string">'os.path.join(sys._MEIPASS, <path>)'</span></code>.</strong></li>
<li><strong>File paths need to be updated to <codeclass="python hljs"><spanclass="hljs-string">'os.path.join(sys._MEIPASS, <path>)'</span></code>.</strong></li>
<li><strong>Only available in <ahref="https://transactions.sendowl.com/products/78175486/4422834F/view">PDF</a>.</strong></li>
<div><h2id="index"><ahref="#index"name="index">#</a>Index</h2><ul><li><strong>Only available in <ahref="https://transactions.sendowl.com/products/78175486/4422834F/view">PDF</a>.</strong></li>
<li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>
<li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>
<li><strong>Searching <codeclass="python hljs"><spanclass="hljs-string">'#<title>'</span></code> will limit the search to the titles.</strong></li>
<li><strong>Searching <codeclass="python hljs"><spanclass="hljs-string">'#<title>'</span></code> will limit the search to the titles.</strong></li>
'$ pyinstaller script.py --add-data \'<path>:.\' <span class="hljs-comment"># Adds file to the root of the executable.</span>\n'+
'</code>'
'$ pyinstaller script.py --add-data \'<path>:.\' <span class="hljs-comment"># Adds file to the root of the executable.</span>\n';
constINDEX=
'<li><strong>Only available in <a href="https://transactions.sendowl.com/products/78175486/4422834F/view">PDF</a>.</strong></li>\n'+
'<li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>\n'+
'<li><strong>Searching <code class="python hljs"><span class="hljs-string">\'#<title>\'</span></code> will limit the search to the titles.</strong></li>\n';