You are viewing an older version (9.3.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.3.0 / IPython / core / completer / _DictKeyState

EnumType

IPython.core.completer:_DictKeyState

source: /IPython/core/completer.py :1344

Signature

def   _DictKeyState ( * values )

Summary

Represent state of the key match in context of other possible matches.

Extended Summary

  • given d1 = {'a': 1} completion on d1['<tab> will yield {'a': END_OF_ITEM} as there is no tuple.

  • given d2 = {('a', 'b'): 1}: d2['a', '<tab> will yield {'b': END_OF_TUPLE} as there is no tuple members to add beyond 'b'.

  • given d3 = {('a', 'b'): 1}: d3['<tab> will yield {'a': IN_TUPLE} as 'a' can be added.

  • given d4 = {'a': 1, ('a', 'b'): 2}: d4['<tab> will yield {'a': END_OF_ITEM & END_OF_TUPLE}

Aliases

  • IPython.core.completer._DictKeyState