3 ms·
Storing objects of any size is common, because Python objects are rarely fixed size (Python integers aren't fixed size!) At that point, you need pointers anywa
by dragonwriter 5y ago
Storing objects of any size is common, because Python objects are rarely fixed size (Python integers aren't fixed size!)
At that point, you need pointers anyway, so mixed type doesn't add much overhead. Especially given that you need to handle mixed concrete types even if you have single “typechecking” types because of inheritance (including via declared ABCs and union types.