From: D-Man <ds...@ri...> - 2001-07-16 16:44:06
|
----- Forwarded message from Jeff Emanuel <je...@ad...> ----- From: Jeff Emanuel <je...@ad...> Date: Mon, 16 Jul 2001 10:27:04 -0600 To: D-Man <ds...@ri...> X-Mailer: Mozilla 4.7 [en] (WinNT; U) D-Man wrote: > [ aside : Hey, where'd "isInstance" go? ] Lower case i. isinstance ----- End forwarded message ----- Doh! Too much Java. (Thanks for the correction) Ok, for the benefit of the OP here is a working example :-). >>> import types >>> a = 1 >>> isinstance( a , types.IntType ) 1 >>> class Foo : pass ... >>> b = Foo() >>> isinstance( b , Foo ) 1 >>> class Bar( Foo ) : pass ... >>> c = Bar() >>> isinstance( c , Foo ) 1 -D |