Deepcopy should remember which objects are already created when going into recursion. There is a 'memo' dict for this purpose:
https://github.com/python/cpython/blob/2d264235f6e066611b412f7c2e1603866e0f7f1b/Lib/copy.py#L236-L241
Deepcopy should remember which objects are already created when going into recursion. There is a 'memo' dict for this purpose:
https:/ /github. com/python/ cpython/ blob/2d264235f6 e066611b412f7c2 e1603866e0f7f1b /Lib/copy. py#L236- L241