bundles / IPython latest / IPython / core / completer / match_dict_keys
function
IPython.core.completer:match_dict_keys
source: /IPython/core/completer.py :1487
Signature
def match_dict_keys ( keys : list[Union[str, bytes, tuple[Union[str, bytes], ...]]] , prefix : str , delims : str , extra_prefix : Optional[tuple[Union[str, bytes], ...]] = None ) → tuple[str, int, dict[str, _DictKeyState]] Summary
Used by dict_key_matches, matching the prefix to a list of keys
Parameters
keyslist of keys in dictionary currently being completed.
prefixPart of the text already typed by the user. E.g.
mydict[b'fodelimsString of delimiters to consider when finding the current key.
extra_prefix: optionalPart of the text already typed in multi-key index cases. E.g. for
mydict['foo', "bar", 'b, this would be('foo', 'bar').
Returns
: A tuple of three elements: ``quote``, ``token_start``, ``matched``, with: ``quote`` being the quote that need to be used to close current string.: ``token_start`` the position where the replacement should start occurring,: ``matches`` a dictionary of replacement/completion keys on keys and valuesindicating whether the state.
Aliases
-
IPython.core.completer.match_dict_keys