消息 [93863]
As mentioned in issue7060, weak dict iterators are easily broken by
cyclic garbage collection changing the size of the underlying dict storage:
File "/home/rdmurray/python/py3k/Lib/weakref.py", line 121, in items
for wr in self.data.values():
RuntimeError: dictionary changed size during iteration
One possible solution is to delay all removals until all iterators are
done. Here is a context manager-based solution. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2009-10-11 17:29:26 | pitrou | 修改 | recipients:
+ pitrou |
| 2009-10-11 17:29:26 | pitrou | 修改 | messageid: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> |
| 2009-10-11 17:29:21 | pitrou | 链接 | issue7105 messages |
| 2009-10-11 17:29:20 | pitrou | 创建 | |
|