An Object's Type
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Wed Dec 5 08:18:19 EST 2007
bg_ie at yahoo.com a écrit :
> Hi,
>
> Is it possible to find out if an object is of a certain type or of a
> type derived from this type?
>
You have the answer, thanks to Diez and Christian. Now unless you have a
*very* compelling reason to check the type of an object, *just forget
about it*. 9 times out of 10, this is fighting against the language's
type system (hint: google for "duck typing").
More information about the Python-list
mailing list