<pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">cdef</span><spanclass="hljs-class"><spanclass="hljs-keyword">class</span><<spanclass="hljs-title">class_name</span>>:</span><spanclass="hljs-comment"># Also `cdef struct <struct_name>:`.</span>
<spanclass="hljs-keyword">cdef</span><spanclass="hljs-keyword">public</span><type> [*]<attr_name><spanclass="hljs-comment"># Also `... <ctype> [*]<field_name>`.</span>
<spanclass="hljs-function"><spanclass="hljs-keyword">def</span><spanclass="hljs-title">__init__</span><spanclass="hljs-params">(self, <type><arg_name>)</span>:</span><spanclass="hljs-comment"># Also `cdef __dealloc__(self):`.</span>
self.<attr_name> = <arg_name><spanclass="hljs-comment"># Also `... free(<pointer/array>)`.</span>
self.<attr_name> = <arg_name><spanclass="hljs-comment"># Also `... free(<array/pointer>)`.</span>
</code></pre>
<div><h3id="virtualenvironments">Virtual Environments</h3><p><strong>System for installing libraries directly into project's directory.</strong></p><pre><codeclass="python hljs">$ python3 -m venv NAME <spanclass="hljs-comment"># Creates virtual environment in current directory.</span>
$ source NAME/bin/activate <spanclass="hljs-comment"># Activates it. On Windows run `NAME\Scripts\activate`.</span>
@ -2938,7 +2938,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active