parameters: (self, block)
docstring: Unwind the values on the data stack when a given block is finished.
docstring_summary: Unwind the values on the data stack when a given block is finished.
docstring_tokens: Unwind the values on the data stack when a given block is finished .
function: def unwind_block(self, block):
          """Unwind the values on the data stack when a given block is finished."""
          if block.type == 'except-handler':
              offset = 3
          else:
              offset = 0
  
          while len(self.stack) > block.stack_height + offset:
              self.pop()
  
          if block.type == 'except-handler':
              traceback, value, exctype = self.popn(3)
              return exctype, value, traceback
function_tokens: def unwind_block ( self , block ) : if block . type == 'except-handler' : offset = 3 else : offset = 0 while len ( self . stack ) > block . stack_height + offset : self . pop ( ) if block . type == 'except-handler' : traceback , value , exctype = self . popn ( 3 ) return exctype , value , traceback