python 2.6 fix in magnitude code (old style dict comprehensions)