dict.items is not generator in python2.x