2 ms·
In CPython at least, there's no other way. Everything is an object, even simple types like integers. And references to objects are implemented with pointers.
by mark-r 5y ago
In CPython at least, there's no other way. Everything is an object, even simple types like integers. And references to objects are implemented with pointers. Even a Numpy array which stores a contiguous array of simple values requires conversion to an object when you actually try to use those values.