fix dict comprehension for python 2.6 and lower