modify dict getter and setter for py2.6 -> py 3.2