Avoid using dict comprehension - doesn't work in Python 2.6