Refactor dict comprehension which doesn't exist in python 2.6.
Merge pull request #126 from plotly/andrew-change-dict-comprehension

Refactor dict comprehension which doesn't exist in python 2.6.