python 2.5 compatibility - remove dict comprehension