

def pop(self, last=True):
    if (not self):
        raise KeyError('set is empty')
    key = (self.end[1][0] if last else self.end[2][0])
    self.discard(key)
    return key

dataset/ETHPy150Open ooici/pyon/pyon/util/set.py OrderedSet.pop/original