del not working for (exhausted) dict iterable value (Python 3.3)
thebalancepro at gmail.com
Tue Mar 12 06:35:43 CET 2013
event['Items'] is an exhausted (all used up) iterable.
Now I do the following (lines 142-4):
and get a KeyError on the del statement. 'Items' is a key in the event dictionary at this point.
The full file is here:
I can get round it by copying all but the 'Items' member to a new dictionary, but obviously I don't want to.
Is there some deep design in Python here, that it won't delete a dict value that's an (exhausted) iterator, or have I found a bug?
Thanks for any help,
More information about the Python-list