original_docstring: Pop the smallest item off the heap, maintaining the heap invariant.
docstring: Pop the smallest item off the heap, maintaining the heap invariant.
docstring_tokens: Pop the smallest item off the heap maintaining the heap invariant .
code: def heappop(heap):
      """Pop the smallest item off the heap, maintaining the heap invariant."""
      last_element = heap.pop()    # raises appropriate IndexError if heap is empty
      if heap:
          returnitem = heap[0]
          heap[0] = last_element
          _siftup(heap, 0)
          return returnitem
      return last_element
code_tokens: def heappop ( heap ) : last_element = heap . pop ( ) if heap : returnitem = heap [ 0 ] heap [ 0 ] = last_element _siftup ( heap , 0 ) return returnitem return last_element
short_docstring: Pop the smallest item off the heap, maintaining the heap invariant.
short_docstring_tokens: Pop the smallest item off the heap maintaining the heap invariant .
comment: """Pop the smallest item off the heap, maintaining the heap invariant."""$SEP$# raises appropriate IndexError if heap is empty