4 ms·
I was a bit puzzled by the "lightweight old style classes" remark, so I tried it out: >>> sys.getsizeof(OldStyleClass), sys.getsizeof(NewStyleClass) (1
by berdario 12y ago
I was a bit puzzled by the "lightweight old style classes" remark, so I tried it out:
>>> sys.getsizeof(OldStyleClass), sys.getsizeof(NewStyleClass)
(104, 904)
>>> sys.getsizeof(OldStyleClass()), sys.getsizeof(NewStyleClass())
(72, 64)
I agree that OldStyleClasses might be simpler (while less featureful), but I think I'd care more for the footprint of instances, rather than class objects themselves