Return a new list of text fragments,
        indexed from start (included) to end (excluded).

        :param int start: the start index, included
        :param int end: the end index, excluded
        :rtype: :class:`~aeneas.textfile.TextFile`

def get_slice(self, start=None, end=None):
        """
        Return a new list of text fragments,
        indexed from start (included) to end (excluded).

        :param int start: the start index, included
        :param int end: the end index, excluded
        :rtype: :class:`~aeneas.textfile.TextFile`
        """
        if start is not None:
            start = min(max(0, start), len(self) - 1)
        else:
            start = 0
        if end is not None:
            end = min(max(0, end), len(self))
            end = max(end, start + 1)
        else:
            end = len(self)
        new_text = TextFile()
        for fragment in self.fragments[start:end]:
            new_text.add_fragment(fragment)
        return new_text