use dict comprehensions instead of constructors

Since we're dropping python2.6 support (it's no longer maintained
upstream) we might as well use some syntactical sugar supported in later
versions.