<tuple> = unpack(<spanclass="hljs-string">'<format>'</span>, <bytes>) <spanclass="hljs-comment"># Use iter_unpack() for iterator of tuples.</span>
<tuple> = unpack(<spanclass="hljs-string">'<format>'</span>, <bytes>) <spanclass="hljs-comment"># Use iter_unpack() to get iterator of tuples.</span>
<real> = <mview>[<index>] <spanclass="hljs-comment"># Returns an int or a float.</span>
<mview> = <mview>[<slice>] <spanclass="hljs-comment"># Mview with rearranged elements.</span>
<mview> = <mview>.cast(<spanclass="hljs-string">'<typecode>'</span>) <spanclass="hljs-comment"># Casts memoryview to the new format.</span>
<mview>.release() <spanclass="hljs-comment"># Releases the object's memory buffer.</span>
<mview>.release() <spanclass="hljs-comment"># Releases memory buffer of target object.</span>
</code></pre></div>
@ -1891,7 +1891,7 @@ CRITICAL:my_module:Running out of disk space.
<dict> = vars(<object>) <spanclass="hljs-comment"># Dict of writable attributes. Also <obj>.__dict__.</span>
<bool> = hasattr(<object>, <spanclass="hljs-string">'<attr_name>'</span>) <spanclass="hljs-comment"># Checks if getattr() raises an AttributeError.</span>
value = getattr(<object>, <spanclass="hljs-string">'<attr_name>'</span>) <spanclass="hljs-comment"># Default value can be passed as the third argument.</span>
setattr(<object>, <spanclass="hljs-string">'<attr_name>'</span>, value) <spanclass="hljs-comment"># Only works on objects with '__dict__' attribute.</span>
setattr(<object>, <spanclass="hljs-string">'<attr_name>'</span>, value) <spanclass="hljs-comment"># Only works on objects with __dict__ attribute.</span>
delattr(<object>, <spanclass="hljs-string">'<attr_name>'</span>) <spanclass="hljs-comment"># Same. Also `del <object>.<attr_name>`.</span>