Index: src/org/python/core/PyType.java =================================================================== --- src/org/python/core/PyType.java (revision 7066) +++ src/org/python/core/PyType.java (working copy) @@ -121,7 +121,13 @@ PyObject[] args, String[] keywords) { // Special case: type(x) should return x.getType() if (args.length == 1 && keywords.length == 0) { - return args[0].getType(); + PyObject obj = args[0]; + PyType objType = obj.getType(); + PyType psmType = PyType.fromClass(PyStringMap.class); + if (objType == psmType) { + return PyDictionary.TYPE; + } + return objType; } // If that didn't trigger, we need 3 arguments. but ArgParser below may give a msg // saying type() needs exactly 3.