Hi,

This is a question for Python wranglers:

If I make a class, how can a programmatically detect that any given 
object is of that class type?

e.g.

class myclass:
        pass

Now, given an object 'foo' how can I say "If foo is of type myclass then do 
something".

I know how to use type(), but in this case type(foo) returns <type 
'instance'>, but any class returns this same result.

(yes I did Google, and didn't like what I found)

Andy

Reply via email to