> class ClassA > ... > > > class ClassB : > def myMethod(self, anInstance) if anInstance.__class__ != ClassA: raise "Oh no!" This won't work for other classes derived from ClassA, however. To do that, check out: anInstance.__class__.__bases__ There may also be some cunning library hack to do this automatically.