On Fri, Aug 24, 2012 at 8:11 AM, Peter Otten <__pete...@web.de> wrote:
>
>         for index, name, fixer in fixers:
>             item = event[index]

@Norman
I forgot to mention this. You should index the event instead of
iterating over it. I suppose each event has a name in index 12, so you
shouldn't get an IndexError.

Then you can loop over combos:

for index, name in combos.items():
    event_dict[name] = event[index]

Or you can generalize the process as Peter has shown.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to