A question about Python Classes
jeanmichel at sequans.com
Thu Apr 21 18:30:14 CEST 2011
> Let's say I have the following....
> class BaseHandler:
> def foo(self):
> print "Hello"
> class HomeHandler(BaseHandler):
> Then I do the following...
> test = HomeHandler()
> How can HomeHandler call foo() when I never created an instance of
you did, test is an instance of BaseHandler.
> isinstance(test, HomeHandler)
> isinstance(test, BaseHandler)
More information about the Python-list