A question about Python Classes

chad cdalten at gmail.com
Thu Apr 21 11:43:15 EDT 2011


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



More information about the Python-list mailing list