>> if type(a) is dict: >> print "a is a dictionnary!"
> class MyDict(dict): > pass > a = MyDict() > type(a) is dict > => False isinstance(a, dict) => True So the question you need to answer is whether you want to determine whether an object is exactly of type dict, or whether it you are willing to accept types derived from dict also. -- http://mail.python.org/mailman/listinfo/python-list