Confusion with calling function of a subclass

Pyenos pyenos at pyenos.org
Fri Dec 22 02:42:27 EST 2006


class TREE:
    def gettree(self):print self
TREE.gettree() # I get an error saying 
               # TypeError: unbound method gettree() must be called
               # with TREE instance as first argument (got nothing instead


I still don't understand how to solve this simple code. 



More information about the Python-list mailing list