Message279231
>>> from sys import getsizeof
>>> class A:
def __init__(self, a, b, c, d, e, f):
self.a = a
self.b = b
self.c = c
self.d = d
self.e = e
self.f = f
>>> a = A(10, 20, 30, 40, 50, 60)
>>> b = A(10, 20, 30, 40, 50, 60)
>>> c = A(10, 20, 30, 40, 50, 60)
>>> d = A(10, 20, 30, 40, 50, 60)
>>> [getsizeof(vars(inst)) for inst in [a, b, c, d]]
[152, 152, 152, 152]
>>> [getsizeof(dict(vars(inst))) for inst in [a, b, c, d]]
[368, 368, 368, 368] |
|
Date |
User |
Action |
Args |
2016-10-22 23:15:16 | rhettinger | set | recipients:
+ rhettinger, serhiy.storchaka, xiang.zhang |
2016-10-22 23:15:16 | rhettinger | set | messageid: <1477178116.18.0.0731769927197.issue28508@psf.upfronthosting.co.za> |
2016-10-22 23:15:16 | rhettinger | link | issue28508 messages |
2016-10-22 23:15:16 | rhettinger | create | |
|