Thanks Alex!
Nick
--
http://mail.python.org/mailman/listinfo/python-list
Am 12.03.2013 06:52 schrieb alex23:
You're effectively doing this:
event = dict(Items=[1,2,3])
for e in event['Items']:
... del event['Items']
...
Traceback (most recent call last):
File stdin, line 2, in module
KeyError: 'Items'
You want to move your del statement up an indentation
Hi all,
event['Items'] is an exhausted (all used up) iterable.
Now I do the following (lines 142-4):
event.update({'Attributes': filtered_attributes})
del event['Items']
yield event
and get a KeyError on the del statement. 'Items' is a key in the event
On Mar 12, 3:35 pm, Nick Mellor thebalance...@gmail.com wrote:
event['Items'] is an exhausted (all used up) iterable.
Now I do the following (lines 142-4):
event.update({'Attributes': filtered_attributes})
del event['Items']
yield event
and get a