blob: fd257b4ef4c10b5f38c5ca5d1fc09ec2600256d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
<span id="abstract"></span><h1>Abstract Objects Layer</h1> <p>The functions in this chapter interact with Python objects regardless of their type, or with wide classes of object types (e.g. all numerical types, or all sequence types). When used on object types for which they do not apply, they will raise a Python exception.</p> <p>It is not possible to use these functions on objects that are not properly initialized, such as a list object that has been created by <a class="reference internal" href="list#c.PyList_New" title="PyList_New"><code>PyList_New()</code></a>, but whose items have not been set to some non-<code>NULL</code> value yet.</p> <ul> <li class="toctree-l1"><a class="reference internal" href="object">Object Protocol</a></li> <li class="toctree-l1">
<a class="reference internal" href="call">Call Protocol</a><ul> <li class="toctree-l2"><a class="reference internal" href="call#the-tp-call-protocol">The tp_call Protocol</a></li> <li class="toctree-l2">
<a class="reference internal" href="call#the-vectorcall-protocol">The Vectorcall Protocol</a><ul> <li class="toctree-l3"><a class="reference internal" href="call#recursion-control">Recursion Control</a></li> <li class="toctree-l3"><a class="reference internal" href="call#vectorcall-support-api">Vectorcall Support API</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="call#object-calling-api">Object Calling API</a></li> <li class="toctree-l2"><a class="reference internal" href="call#call-support-api">Call Support API</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="number">Number Protocol</a></li> <li class="toctree-l1"><a class="reference internal" href="sequence">Sequence Protocol</a></li> <li class="toctree-l1"><a class="reference internal" href="mapping">Mapping Protocol</a></li> <li class="toctree-l1"><a class="reference internal" href="iter">Iterator Protocol</a></li> <li class="toctree-l1">
<a class="reference internal" href="buffer">Buffer Protocol</a><ul> <li class="toctree-l2"><a class="reference internal" href="buffer#buffer-structure">Buffer structure</a></li> <li class="toctree-l2">
<a class="reference internal" href="buffer#buffer-request-types">Buffer request types</a><ul> <li class="toctree-l3"><a class="reference internal" href="buffer#request-independent-fields">request-independent fields</a></li> <li class="toctree-l3"><a class="reference internal" href="buffer#readonly-format">readonly, format</a></li> <li class="toctree-l3"><a class="reference internal" href="buffer#shape-strides-suboffsets">shape, strides, suboffsets</a></li> <li class="toctree-l3"><a class="reference internal" href="buffer#contiguity-requests">contiguity requests</a></li> <li class="toctree-l3"><a class="reference internal" href="buffer#compound-requests">compound requests</a></li> </ul> </li> <li class="toctree-l2">
<a class="reference internal" href="buffer#complex-arrays">Complex arrays</a><ul> <li class="toctree-l3"><a class="reference internal" href="buffer#numpy-style-shape-and-strides">NumPy-style: shape and strides</a></li> <li class="toctree-l3"><a class="reference internal" href="buffer#pil-style-shape-strides-and-suboffsets">PIL-style: shape, strides and suboffsets</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="buffer#buffer-related-functions">Buffer-related functions</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="objbuffer">Old Buffer Protocol</a></li> </ul> <div class="_attribution">
<p class="_attribution-p">
© 2001–2023 Python Software Foundation<br>Licensed under the PSF License.<br>
<a href="https://docs.python.org/3.12/c-api/abstract.html" class="_attribution-link">https://docs.python.org/3.12/c-api/abstract.html</a>
</p>
</div>
|