CPython's NotImplemented Implementation in C
Python’s NotImplemented is not an exception and not a function result that means “I gave up.” It is a real singleton object of type NotImplementedType, returned from operator …
Python’s NotImplemented is not an exception and not a function result that means “I gave up.” It is a real singleton object of type NotImplementedType, returned from operator …
Every Python value is a PyObject *. The type that defines what that pointer points at is object itself, implemented in CPython as PyBaseObject_Type in Objects/typeobject.c. Its …
OrderedDict is a dict subclass with a linked list of keys and a lazily rebuilt mirror array, giving O(1) node lookup without touching every dict resize.
PickleBuffer is a tiny C object that holds one Py_buffer view and forwards every buffer request straight to the original exporter — no copies, no managed-buffer layer.
A PyCapsule is a typed, name-checked void* wrapper: the name stops you reading the wrong capsule, and the destructor gets one shot to clean up before the memory goes.