mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-24 21:40:16 +00:00
Update 07_dict.py
This commit is contained in:
parent
5e2652a569
commit
8f5a9e8908
@ -162,3 +162,11 @@ except TypeError:
|
|||||||
a = {1: 2, 3: 4}
|
a = {1: 2, 3: 4}
|
||||||
a['a'] = a
|
a['a'] = a
|
||||||
assert repr(a) == "{1: 2, 3: 4, '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()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user