Python script error

I followed Hazza’s mini tutorial at the end of the thread “Dupliframes with Shape keys”, and got a “python script error-check console” message when I clicked on the script.

The console log says:

File “<string>”, line 229
edge_dict= dict((ed_key(ed), [ed, 0]) for ed in me.edges)
^
SyntaxError: invalid syntax

Can anyone give me advice on how to fix this?

Thank you.