Pop-scope (same as exit-scope) but return all keys that are tracked (and
would have been deleted).
969368
static public Key[] pop() {
    Stack<HashSet<Key>> keys = _scope.get()._keys;
    return keys.size() > 0 ? keys.pop().toArray(new Key[0]) : null;
  }
108613
def pop(self, key):
        
        r = self[key]
        self.remove(key)
        return r
328597
def peek(self):
        
        # Ammortized O(1)
        _heap = self._heap
        _dict = self._dict
        val, key = _heap[0]
        # Remove items marked for lazy deletion as they are encountered
        while key not in _dict or _dict[key] != val:
            self._heappop(_heap)
            val, key = _heap[0]
        return key, val
139329
def get_visible_scopes(self):
        
        return [k for k, s in current_oauth2server.scope_choices()
                if k in self.scopes]
379314
def pop(self, key, default):
        """"""
        with self._lock:
            return self._dict.pop(key, default)
1212147
def pop_all(self):
        
        with self.lock:
            output = list(self.queue)
            self.queue.clear()

        return output
529178
def scopes(cls):
        
        # Why do we need this? This should either
        # * Be bubbled to the places where it is used (AcidXBlock).
        # * Be automatic. Look for all members of a type.
        return [cls.USAGE, cls.DEFINITION, cls.TYPE, cls.ALL]
1333564
def all_enclosing_scopes(scope, allow_global=True):
  """"""

  _validate_full_scope(scope)

  # TODO: validate scopes here and/or in `enclosing_scope()` instead of assuming correctness.
  def scope_within_range(tentative_scope):
    if tentative_scope is None:
      return False
    if not allow_global and tentative_scope == GLOBAL_SCOPE:
      return False
    return True

  while scope_within_range(scope):
    yield scope
    scope = (None if scope == GLOBAL_SCOPE else enclosing_scope(scope))
68695
def getallkeys(self, key, failobj=None):
        """"""
        if self.mmkeys is None: self._mmInit()
        return self.mmkeys.get(key, failobj)
375075
def pop_all(self):
        """"""
        new_stack = type(self)()
        new_stack._exit_callbacks = self._exit_callbacks
        self._exit_callbacks = deque()
        return new_stack
346653
def pop(self, key=NOT_SET, index=NOT_SET, d=NOT_SET):
		
		has_default = d is not NOT_SET

		if index is NOT_SET and key is not NOT_SET:
			index, value = self._pop_key(key, has_default)
		elif key is NOT_SET:
			key, index, value = self._pop_index(index, has_default)
		else:
			raise KEY_AND_INDEX_ERROR

		if index is None:
			return d
		else:
			self._fix_indices_after_delete(index)
			return value
165780
def pop(self, key, *args, **kwargs):
        
        try:
            val = self[key]
        except KeyError:
            if len(args):
                return args[0]
            if "default" in kwargs:
                return kwargs["default"]
            raise

        try:
            del(self[key])
        except KeyError:
            pass

        return val
797391
def get_all(self, key, fallback=None):
        """"""
        if key in self.headers:
            value = self.headers[key]
        else:
            value = fallback or []
        return value
110633
def pop(self, key):
        

        try:
            self.result_cache.pop(repr(key))

        except KeyError:
            pass

        return DataArray.pop(self, key)
925281
def deleted(self):
        
        query = queries.build_query({**self.spec,
                                     'future': False,
                                     '_deleted': True})
        return [Entry(e) for e in query]
149631
def pop(self, key, *args):
        ''
        try:
            return self.maps[0].pop(key, *args)
        except KeyError:
            raise KeyError('Key not found in the first mapping: {!r}'.format(key))
286788
def deleted_keys(self) -> Iterable[bytes]:
        
        for key, value in self._changes.items():
            if value is DELETED:
                yield key