Move an existing element to the end (or beginning if last==False).

        Raises KeyError if the element does not exist.
        When last=True, acts like a fast version of self[key]=self.pop(key).
966213
def move_to_end(self, key, last=True):
        '''

        '''
        link = self.__map[key]
        link_prev = link.prev
        link_next = link.next
        link_prev.next = link_next
        link_next.prev = link_prev
        root = self.__root
        if last:
            last = root.prev
            link.prev = last
            link.next = root
            last.next = root.prev = link
        else:
            first = root.next
            link.prev = root
            link.next = first
            root.next = first.prev = link
1024572
private void pop() throws SAXException {
        if (current == null) {
            throw new IllegalStateException("Bug!");
        }
        current.end();
        if (stack.isEmpty()) {
            current = null;
        } else {
            current = stack.removeLast();
        }
    }
530448
def pop(self):
        
        result = self.redis.spop(self.key)
        if result is None:
            raise KeyError

        return self._unpickle(result)
464557
function moveLeftTop(props, position) {
  const elementBBox = props.elementBBox,
    elementStyle = props.elementStyle,
    offset = props.htmlOffset;
  let moved = false;
  if (position.left !== elementBBox.left) {
    elementStyle.left = position.left + offset.left + 'px';
    moved = true;
  }
  if (position.top !== elementBBox.top) {
    elementStyle.top = position.top + offset.top + 'px';
    moved = true;
  }
  return moved;
}
415352
def _handle_end_way(self):
        
        self._result.append(Way(result=self._result, **self._curr))
        self._curr = {}
951145
def _pop_key(self, key, has_default):
		""""""
		try:
			index, value = self._dict.pop(key)
		except KeyError:
			if has_default:
				return None, None
			else:
				raise
		key2, value2 = self._list.pop(index)
		assert key is key2
		assert value is value2

		return index, value
108613
def pop(self, key):
        
        r = self[key]
        self.remove(key)
        return r
450825
function elementEnd() {
    if (isParent) {
        isParent = false;
    }
    else {
        ngDevMode && assertHasParent();
        previousOrParentNode = getParentLNode(previousOrParentNode);
    }
    ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);
    var queries = previousOrParentNode.queries;
    queries && queries.addNode(previousOrParentNode);
    queueLifecycleHooks(previousOrParentNode.tNode.flags, tView);
    currentElementNode = null;
}
885805
function endNode() {
            if (parent.children) {
                mergeChildren(parent.children);
                sortChildren(parent.children);
            }
            parent = parentsStack.pop();
        }
162505
def pop(self, key):
        """"""
        arr = dict.pop(self, key).copy()
        self.remover(key)
        return arr
778251
def _handle_end_node(self):
        
        self._result.append(Node(result=self._result, **self._curr))
        self._curr = {}
990996
def set_last_position(self, last_position):
        
        if last_position:
            if isinstance(last_position, six.string_types):
                last_key = last_position
            else:
                last_key = last_position.get('last_key', '')
            self.last_position = dict(last_key=last_key)
            self.collection_scanner.set_startafter(last_key)
        else:
            self.last_position = {}
784790
def set_end(self,t):
    
    self.__dur -= self.__end - t
    self.__end = t
92928
def last(from: nil, to: nil, &block)
      retval = nil

      each_with_depth(from: from, to: nil) do |line, depth, index|
        retval = line if block.call(line, depth, index)
      end

      retval
    end
4216
def pop(self, key, default=UNSET):
        
        self._find_lt(key)
        node = self._path[0][2]
        if node is self._tail or key < node[0]:
            if default is self.UNSET:
                raise KeyError('key {!r} not in list')
            return default
        self._remove(node)
        return node[1]
656066
def insert(self, val, position=0):
        
        if position <= 0:  # at beginning
            return self.insert_first(val)

        counter = 0
        last_node = self.head
        current_node = self.head

        while current_node is not None and counter <= position:
            if counter == position:
                last_node.next_node = Node(val, current_node)
                return True

            last_node = current_node
            current_node = current_node.next_node
            counter += 1

        if current_node is None:  # append to last element
            last_node.next_node = Node(val, None)

        return True
337132
def pop(self, key, default=MISSING):
        
        try:
            val = self[key]
        except KeyError:
            if default is MISSING:
                raise
            val = default
        else:
            del self[key]
        return val