Message 18959 - Python tracker

Message18959

Author dcjim
Recipients
Date 2003-11-10.11:32:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
You can't use iterators on wekref dicts because items
might be removed from the dictionaries while iterating
due to GC.

I've attached a script that illustrates the bug with
Python 2.3.2. It doesn't matter whether you use weak
key or weak value dicts.

If this can't be fixed, then the iteration methods should
either be removed or made to (lamely) create intermediate
lists to work around the problem.

History
Date User Action Args
2007-08-23 14:18:12adminlinkissue839159 messages
2007-08-23 14:18:12admincreate