fileslice.py
def slices(self, size, n=3):
        '''
        Create equal sized slices of the file. The last slice may be larger than
        the others.
        
        args:
            * size (int): The full size to be sliced.
            * n (int): The number of slices to return.
        returns:
            A list of `FileSlice` objects of length (n).
        '''
        if n <= 0:
            raise ValueError('n must be greater than 0')
        if size < n:
            raise ValueError('size argument cannot be less than n argument')
        slice_size = size // n
        last_slice_size = size - (n-1) * slice_size
        t = [self(c, slice_size) for c in range(0, (n-1)*slice_size, slice_size)]
        t.append(self((n-1)*slice_size, last_slice_size))
        return t
def slices(self, size, n=3):
        '''
        Create equal sized slices of the file. The last slice may be larger than
        the others.
        
        args:
            * size (int): The full size to be sliced.
            * n (int): The number of slices to return.
        returns:
            A list of `FileSlice` objects of length (n).
        '''
        if n <= 0:
            raise ValueError('n must be greater than 0')
        if size < n:
            raise ValueError('size argument cannot be less than n argument')
        slice_size = size // n
        last_slice_size = size - (n-1) * slice_size
        t = [self(c, slice_size) for c in range(0, (n-1)*slice_size, slice_size)]
        t.append(self((n-1)*slice_size, last_slice_size))
        return t
Create equal sized slices of the file. The last slice may be larger than
        the others.
        
        args:
            * size (int): The full size to be sliced.
            * n (int): The number of slices to return.
        returns:
            A list of `FileSlice` objects of length (n).