Guillermo a écrit : > Hello, > > This is my first post here. I'm getting my feet wet with Python and I > need to know how can I check whether a variable is of type dictionary.
What makes you say you "need" to know this ? Except for a couple corner cases, you usually don't need to care about this. If you told us more about the actual problem (instead of asking about what you think is the solution), we might be of more help... > Something like this: > > if isdict(a) then print "a is a dictionary" Should this work for subclasses of dicts ? Should this work for non-subclasses of dict implementing the dict protocol ? -- http://mail.python.org/mailman/listinfo/python-list