def __str__ (self): string = "Vertex ID = " + str(self._vertexID) + "\n" string += "\t" + Vertex.predecessorStr(self) string += "\t" + Vertex.successorStr(self) string += "\t" + 40 * "=" + "\n" for address, instr in sorted(self.instructions.iteritems()): string += "\t" + instr.__str__() + "\n" string += "\t" + 40 * "=" + "\n" return string
def __init__ (self, vertexID): Vertex.__init__(self, vertexID) self.instructions = {}