class Tree:
def Tree(self):
self.rootNode = None
def Tree(self, rootNode):
self.rootNode = rootNode
def getRootNode(self):
return self.rootNode
def setRootNode(self, rootNode):
self.rootNode = rootNode
class Node:
def Node(self):
self.content = ''
self.isleaf = False
self.childnode = None
self.label = ''
def setContent(self, content=''):
self.content = content
def getContent(self):
return self.content
def setLeaf(self, leaf):
self.isleaf = leaf
def isLeaf(self):
return self.isleaf
def setChild(self, childnode):
self.childnode = childnode
def getChild(self):
return self.childnode
def setLabel(self, label=''):
self.label = label
def getLabel(self):
return self.label
t = Tree()
n = Node()
look at this code. Edit this code with IDLE. For example change one of the 'self' statement
in the code. For instance change self => slf then save the file and press F5(Run Module)
It doesn't complain about the code !!! this is my problem.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor