check if var is dict

Astan Chee stanc at
Mon Aug 13 12:01:30 CEST 2007

I have a variable, I want to check if it is a dictionary or a string.
Is there any better way to do this than I've done. How I did it is by 
doing a .items() and catching a AttributeError that it raises if its not 
a dictionary.
How do i properly do it?

More information about the Python-list mailing list