python 3 (pre 3.3) dict optimisation does not work