fix for python 2.6

python 2.6 has no dict comprehension