Why weakref doesn't support built-in types in Python?

前端 未结 2 751
南笙
南笙 2021-01-04 11:05

In Python weakref document( http://docs.python.org/library/weakref.html ), it says that

Several built-in types such as list and dict do not directly

2条回答
  •  天命终不由人
    2021-01-04 11:46

    My educated guess is that dicts and lists are used internally to implement weakrefs, so you would have an egg-chicken situation here.

提交回复
热议问题