def pop(self):
        '''Return a new ImmutableVector with the last item removed.'''
        if self._length == 0:
            raise IndexError()
        newvec = ImmutableVector()
        newvec.tree = self.tree.remove(self._length-1)
        newvec._length = self._length-1
        return newvec
dataset/ETHPy150Open zhemao/funktown/funktown/vector.py/ImmutableVector.pop/original