{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / completer / _DictKeyState

EnumType

IPython.core.completer:_DictKeyState

source: /dev/ipython/IPython/core/completer.py:1443

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