Update 07_dict.py

This commit is contained in:
blueloveTH 2024-04-28 20:19:08 +08:00
parent 5e2652a569
commit 8f5a9e8908

View File

@ -162,3 +162,11 @@ except TypeError:
a = {1: 2, 3: 4}
a['a'] = a
assert repr(a) == "{1: 2, 3: 4, 'a': {...}}"
# test gc
import gc
gc.collect()
x = gc.collect()
for k, v in a.items():
pass
assert x+1 == gc.collect()