Let\'s say I have:
class A(object): pass class B(A): pass
I want to declare a function that takes a subclass of A as an argument:
All classes are an instance of the type class:
type
>>> class Foo: ... pass ... >>> type(Foo()) >>> type(Foo) >>> type(Foo) is type True
So, a valid answer would be:
:type klass: type