擅长:python、mysql、java
<p>你在找:</p>
<blockquote>
<p><strong>isinstance(object, classinfo)</strong> </p>
<p>Return
true if the object argument is an
instance of the classinfo argument, or
of a (direct or indirect) subclass
thereof. Also return true if classinfo
is a type object (new-style class) and
object is an object of that type or of
a (direct or indirect) subclass
thereof. If object is not a class
instance or an object of the given
type, the function always returns
false. If classinfo is neither a class
object nor a type object, it may be a
tuple of class or type objects, or may
recursively contain other such tuples
(other sequence types are not
accepted). If classinfo is not a
class, type, or tuple of classes,
types, and such tuples, a TypeError
exception is raised.</p>
</blockquote>
<p>不管你想做什么似乎都不是个好主意。请详细描述您最初的需求,我们将帮助您设计出更好的设计。</p>