Message154636
| Author |
Yury.Selivanov |
| Recipients |
Yury.Selivanov, pitrou, rhettinger |
| Date |
2012年02月29日.14:55:22 |
| SpamBayes Score |
0.0024668537 |
| Marked as misclassified |
No |
| Message-id |
<1330527323.97.0.52214771843.issue14159@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
WeakSet has a bug in its '__len__' method, where it performs iteration though 'self.data' without ensuring _IterationGuard.
This leads to some hard to catch errors with the following traceback:
builtins.RuntimeError: Set changed size during iteration
File /usr/lib64/python3.2/_weakrefset.py, line 66, in __len__
return sum(x() is not None for x in self.data)
File /usr/lib64/python3.2/_weakrefset.py, line 66, in <genexpr>
return sum(x() is not None for x in self.data) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月29日 14:55:24 | Yury.Selivanov | set | recipients:
+ Yury.Selivanov, rhettinger, pitrou |
| 2012年02月29日 14:55:23 | Yury.Selivanov | set | messageid: <1330527323.97.0.52214771843.issue14159@psf.upfronthosting.co.za> |
| 2012年02月29日 14:55:23 | Yury.Selivanov | link | issue14159 messages |
| 2012年02月29日 14:55:23 | Yury.Selivanov | create |
|