gain python 2.6 compatibility by rewriting the dict comprehension