weak.ref 的构造函数还可以接受一个可选的回调函数,删除引用所指向的对象时就会调用这个回调函数。 import weakref class RefObject: def __del__(self): ...
確定! 回上一頁