Reference counting - how to deal with objects that contain themselves without explicitly making the references inside weak

前端 未结 0 845
傲寒
傲寒 2021-02-19 07:48

Here\'s my problem: I have an object, e.g.

l = [1,2,3]
l.append(l) # assume that it appends a reference to l, not just [1,2,3]

Now, when l is del

相关标签:
回答
  • 消灭零回复
提交回复
热议问题