dict comprehension are Python 2.7+.  Try `dict((key, value) for (key, value) in sequence)` instead.