

def insert(self, index, key, value):
    '\n        Takes ``index``, ``key``, and ``value`` as arguments.\n\n        Sets ``key`` to ``value``, so that ``key`` is at position ``index`` in\n        the OrderedDict.\n\n        >>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))\n        >>> d.insert(0, 4, 0)\n        >>> d\n        OrderedDict([(4, 0), (1, 3), (3, 2), (2, 1)])\n        >>> d.insert(0, 2, 1)\n        >>> d\n        OrderedDict([(2, 1), (4, 0), (1, 3), (3, 2)])\n        >>> d.insert(8, 8, 1)\n        >>> d\n        OrderedDict([(2, 1), (4, 0), (1, 3), (3, 2), (8, 1)])\n        '
    if (key in self):
        del self[key]
    self._sequence.insert(index, key)
    dict.__setitem__(self, key, value)

dataset/ETHPy150Open editorconfig/editorconfig-vim/plugin/editorconfig-core-py/editorconfig/odict.py OrderedDict.insert/original