def pop(self):
        """
        Pops a value off the top of the stack.

        @return: Value popped off the stack.
        @rtype: *

        @raise StackError: Raised when there is a stack underflow.
        """

        if self.stack:
            val = self.stack[0]
            self.stack = self.stack[1:]
            return val
        else:
            raise StackError('Stack empty')
def pop ( self ) : if self . stack : val = self . stack [ 0 ] self . stack = self . stack [ 1 : ] return val else : raise StackError ( 'Stack empty' )
Pops a value off the top of the stack.

        @return: Value popped off the stack.
        @rtype: *

        @raise StackError: Raised when there is a stack underflow.