Commits

stepahn committed bceed77

added repr for Stack

  • Participants
  • Parent commits 2b700db

Comments (0)

Files changed (1)

         self.content = [None] * size
         self.pointer = 0
 
+    def __repr__(self):
+        return "Stack %(content)s@%(pointer)d" % {'pointer': self.pointer, 'content': self.content}
+
     def pop(self):
         e = self.top()
         i = self.pointer - 1