Push an I{object} onto the stack. @param x: An object to push. @type x: L{Frame} @return: The pushed frame. @rtype: L{Frame}
(self, x)
| 246 | self.stack = Stack() |
| 247 | |
| 248 | def push(self, x): |
| 249 | """ |
| 250 | Push an I{object} onto the stack. |
| 251 | @param x: An object to push. |
| 252 | @type x: L{Frame} |
| 253 | @return: The pushed frame. |
| 254 | @rtype: L{Frame} |
| 255 | """ |
| 256 | if isinstance(x, Frame): |
| 257 | frame = x |
| 258 | else: |
| 259 | frame = Frame(x) |
| 260 | self.stack.append(frame) |
| 261 | log.debug('push: (%s)\n%s', Repr(frame), Repr(self.stack)) |
| 262 | return frame |
| 263 | |
| 264 | def top(self): |
| 265 | """ |