

def pop(self, key, *args):
    '\n        No dict.pop in Python 2.2, gotta reimplement it\n\n        >>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))\n        >>> d.pop(3)\n        2\n        >>> d\n        OrderedDict([(1, 3), (2, 1)])\n        >>> d.pop(4)\n        Traceback (most recent call last):\n        KeyError: 4\n        >>> d.pop(4, 0)\n        0\n        >>> d.pop(4, 0, 1)\n        Traceback (most recent call last):\n        TypeError: pop expected at most 2 arguments, got 3\n        '
    if (len(args) > 1):
        raise TypeError(('pop expected at most 2 arguments, got %s' % (len(args) + 1)))
    if (key in self):
        val = val[key]
        del self[key]
    else:
        try:
            val = args[0]
        except IndexError:
            raise KeyError(key)
    return val

dataset/ETHPy150Open editorconfig/editorconfig-vim/plugin/editorconfig-core-py/editorconfig/odict.py OrderedDict.pop/VarMisuse@58/282 `self`->`val`