Determine possible keys after a push or pop
321643
def _instant_search(self):
        
        _keys = []
        for k,v in self.searchables.iteritems():
            if self.string in v:
                _keys.append(k)
        self.candidates.append(_keys)
138421
def _push_entry(self, key):
        ""
        self._invalidate_entry(key)

        new_entry = AccessEntry(key)
        self.access_lookup[key] = new_entry

        self.access_log_lock.acquire()
        self.access_log.appendleft(new_entry)
        self.access_log_lock.release()
855205
def postprocess_keyevent(self, event):
        """"""
        ShellBaseWidget.postprocess_keyevent(self, event)
        if QToolTip.isVisible():
            _event, _text, key, _ctrl, _shift = restore_keyevent(event)
            self.hide_tooltip_if_necessary(key)
682945
def keys(self, namespace, prefix=None, limit=None, offset=None):
        """"""
        params = [namespace]
        query = 'SELECT key FROM gauged_keys WHERE namespace = %s'
        if prefix is not None:
            query += ' AND key LIKE %s'
            params.append(prefix + '%')
        if limit is not None:
            query += ' LIMIT %s'
            params.append(limit)
        if offset is not None:
            query += ' OFFSET %s'
            params.append(offset)
        cursor = self.cursor
        cursor.execute(query, params)
        return [key for key, in cursor]
162505
def pop(self, key):
        """"""
        arr = dict.pop(self, key).copy()
        self.remover(key)
        return arr
379314
def pop(self, key, default):
        """"""
        with self._lock:
            return self._dict.pop(key, default)
397442
function getKeys(key) {
    var keys;
    key = key.replace(/\s/g, '');
    keys = key.split(',');
    if ((keys[keys.length - 1]) == '') {
      keys[keys.length - 2] += ',';
    }
    return keys;
  }
942110
def rpoplpush(self, sourcekey, destkey, *, encoding=_NOTSET):
        
        return self.execute(b'RPOPLPUSH', sourcekey, destkey,
                            encoding=encoding)
108613
def pop(self, key):
        
        r = self[key]
        self.remove(key)
        return r
871423
def _process_keyevent(self, keyinfo):
        
        """
        #Process exit keys. Only exit on empty line
        log(u"_process_keyevent <%s>"%keyinfo)

        def nop(e):
            pass
        if self.next_meta:
            self.next_meta = False
            keyinfo.meta = True
        keytuple = keyinfo.tuple()

        if self._insert_verbatim:
            self.insert_text(keyinfo)
            self._insert_verbatim = False
            self.argument = 0
            return False

        if keytuple in self.exit_dispatch:
            pars = (self.l_buffer, lineobj.EndOfLine(self.l_buffer))
            log(u"exit_dispatch:<%s, %s>"%pars)
            if lineobj.EndOfLine(self.l_buffer) == 0:
                raise EOFError
        if keyinfo.keyname or keyinfo.control or keyinfo.meta:
            default = nop
        else:
            default = self.self_insert
        dispatch_func = self.key_dispatch.get(keytuple, default)

        log(u"readline from keyboard:<%s,%s>"%(keytuple, dispatch_func))

        r = None
        if dispatch_func:
            r = dispatch_func(keyinfo)
            self._keylog(dispatch_func, self.l_buffer)
            self.l_buffer.push_undo()

        self.previous_func = dispatch_func
        return r
69609
def pop (self, key, *args):
        """"""
        assert isinstance(key, basestring)
        return dict.pop(self, key.lower(), *args)
416307
def _humanSortKey(s):
  """"""
  if isinstance(s, str):
    return [w.isdigit() and int(w) or w for w in re.split(r'(\d+)', s)]
  else:
    return s
1027829
def on_key(self, event):
        """"""

        if self.main_window.grid.actions.pasting and \
           event.GetKeyCode() == wx.WXK_ESCAPE:
            self.aborted = True

        event.Skip()
1216958
def keylist_next
      rkey = []
      err = GPGME::gpgme_op_keylist_next(self, rkey)
      exc = GPGME::error_to_exception(err)
      raise exc if exc
      rkey[0]
    end
1206054
def dict_pop_or(d, key, default=None):
    
    val = default
    with suppress(KeyError):
        val = d.pop(key)
    return val
18505
def key_event(self, key, action):
        
        if action == self.wnd.keys.ACTION_PRESS:
            if key == self.wnd.keys.SPACE:
                print("Space was pressed")

        if action == self.wnd.keys.ACTION_RELEASE:
            if key == self.wnd.keys.SPACE:
                print("Space was released")
208137
def check_key(self, key):
        """"""
        return _check_key(key, allow_unicode_keys=self.allow_unicode_keys,
                          key_prefix=self.key_prefix)