<li><strong>Partial is useful in cases when a function needs to be passed as an argument, because it enables us to set the arguments beforehand.</strong></li>
<li><strong>A few examples being <codeclass="python hljs"><spanclass="hljs-string">'defaultdict(<function>)'</span></code>, <codeclass="python hljs"><spanclass="hljs-string">'iter(<function>, to_exclusive)'</span></code> and dataclass's <codeclass="python hljs"><spanclass="hljs-string">'field(default_factory=<function>)'</span></code>.</strong></li>
</ul>
<h3id="nonlocal">Nonlocal</h3>
<p><strong>If variable is being assigned to anywhere in the scope, it is regarded as a local variable, unless it is declared as a 'global' or a 'nonlocal'.</strong></p>