On Apr 21, 9:30 am, Jean-Michel Pichavant <jeanmic...@sequans.com> wrote: > chad wrote: > > Let's say I have the following.... > > > class BaseHandler: > > def foo(self): > > print "Hello" > > > class HomeHandler(BaseHandler): > > pass > > > Then I do the following... > > > test = HomeHandler() > > test.foo() > > > How can HomeHandler call foo() when I never created an instance of > > BaseHandler? > > > Chad > > you did, test is an instance of BaseHandler. > > > isinstance(test, HomeHandler) > < True > > > isinstance(test, BaseHandler) > < True >
So it just just creates an instance of every class that it inherits? Chad -- http://mail.python.org/mailman/listinfo/python-list