Q:

Why does this dict of 7 items only consume 368 bytes?

After some indepth reading, all documentation leads to state two things about dictionaries:

They instantiate with enough capacity for '8' items
They implicitly resize at 2/3 full (4x under 50,000 items and 2x above)

If that is the case, why does this dictionary only consume 368 bytes of RAM, when an empty dictionary takes 240 bytes, shouldn't this of resized 4x, e.g: 960 bytes?
    >>> getsizeof(dict(a=1,b=2,c=3,d=4,e=5,f=6,g=7))
    368
    >>> getsizeof(dict(a=1,b=2,c=3))
    240

Am I being misinformed or misunderstanding something core here?
Did something change with regards to this information on python 3.7?

A:

import sys
dictt=dict()
array=[]
for i in range(0,1000):
    dictt[i]=i
    array.append(sys.getsizeof(dictt))
print(array)

numberarray=[]
for i in range(1,1001):
    numberarray.append(i)

import matplotlib.pyplot as plt
plt.plot(numberarray,array)
plt.ylabel('memory')
plt.xlabel("items")
plt.show()

now visualize the question helps a lot. you got a nice debating topic.

you should refer:
http://www.jessicayung.com/how-python-implements-dictionaries/

