isinstance method
Erik Max Francis
max at alcyone.com
Mon Mar 15 18:28:53 EST 2004
niurka.perez at cimex.com.cu wrote:
> I need to find out dynamically if an object is instance of a Class but
> I don't
> know how to use this isinstance buit-in function. I have the object
> and the name
> of the class, what should I do?
You want the actual class, not its name:
isinstance(instance, Class)
--
__ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ The public is a fool.
-- Alexander Pope
More information about the Python-list
mailing list