def pop( self, *args, **kwargs):
        """Removes and returns item at specified index (default=last).
           Supports both list and dict semantics for pop(). If passed no
           argument or an integer argument, it will use list semantics
           and pop tokens from the list of parsed tokens. If passed a 
           non-integer argument (most likely a string), it will use dict
           semantics and pop the corresponding value from any defined 
           results names. A second default return value argument is 
           supported, just as in dict.pop()."""
        if not args:
            args = [-1]
        for k,v in kwargs.items():
            if k == 'default':
                args = (args[0], v)
            else:
                raise TypeError("pop() got an unexpected keyword argument '%s'" % k)
        if (isinstance(args[0], int) or 
                        len(args) == 1 or 
                        self in args[0]):
            index = args[0]
            ret = self[index]
            del self[index]
            return ret
        else:
            defaultvalue = args[1]
            return defaultvalue
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/pyparsing.py/ParseResults.pop/swapped operands of `in`