<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 24.0px 'D2Coding ligature'; color: #f2f2f2; background-color: #000000; background-color: rgba(0, 0, 0, 0.62)} span.s1 {font-variant-ligatures: no-common-ligatures} </style>

>>> class test:

...  def __init__(self):

...   self.a=self.b=self.c=None

... 

>>> t=test()

>>> t.a=1

>>> t.b=2

>>> t.c=1

>>> sys.getsizeof(t)

64

>>> sys.getsizeof(t.a)

28

>>> 


>>> class test:

...  def __init__(self):

...   self.a=self.b=None

... 

>>> t=test()

>>> t.a=1

>>> t.b=1

>>> sys.getsizeof(t.a)

28

>>> sys.getsizeof(t)

<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 24.0px 'D2Coding ligature'; color: #f2f2f2; background-color: #000000; background-color: rgba(0, 0, 0, 0.62)} span.s1 {font-variant-ligatures: no-common-ligatures} </style>

64



멤버 변수를 늘려도 객체의 크기가 같은데...

내부에서 어떻게 돌아가고 있는거죠? ㅠㅠ