workaround missing dict comprehension in python2.6