When running the following code, I get AttributeError: stat instance has no attribute 'printStats'. What is the problem here?
class stat():
def __init__(self, fname, blocks, backEdges):
self.fname = fname
self.blocks = blocks
self.backEdges = backEdges
def printStats(self):
print self.fname + str(self.blocks) + str(self.backEdges)
element = stat("a", 1, 2)
element.printStats()
Your indentation is goofed, mixing tabs and spaces. Use
python -ttto verify.