IPython 8.4.0 Pypi GitHub Homepage
Other Docs
ParametersReturns
match_dict_keys(keys: List[Union[str, bytes, Tuple[Union[str, bytes]]]], prefix: str, delims: str, extra_prefix: Optional[Tuple[str, bytes]] = None) -> Tuple[str, int, List[str]]

Parameters

keys :

list of keys in dictionary currently being completed.

prefix :

Part of the text already typed by the user. E.g. :None:None:`mydict[b'fo`

delims :

String of delimiters to consider when finding the current key.

extra_prefix : optional

Part of the text already typed in multi-key index cases. E.g. for :None:None:`mydict['foo', "bar", 'b`, this would be :None:None:`('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 list of replacement/completion

Used by dict_key_matches, matching the prefix to a list of keys

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/core/completer.py#761
type: <class 'function'>
Commit: