(self)
return result
Extract the doctests if found.
        If there are doctests, they are removed from the input data and set on
        a specific buffer as they won't be altered.

        :return: True if found and proceeded else False
Extract the doctests if found.
        If there are doctests, they are removed from the input data and set on
        a specific buffer as they won't be altered.
Extract the doctests if found . If there are doctests they are removed from the input data and set on a specific buffer as they won t be altered .
def _extract_docs_doctest(self):
        """Extract the doctests if found.
        If there are doctests, they are removed from the input data and set on
        a specific buffer as they won't be altered.

        :return: True if found and proceeded else False
        """
        result = False
        data = self.docs['in']['raw']
        start, end = self.dst.get_doctests_indexes(data)
        while start != -1:
            print (start, end)
            result = True
            datalst = data.splitlines()
            if self.docs['in']['doctests'] != "":
                self.docs['in']['doctests'] += '\n'
            self.docs['in']['doctests'] += '\n'.join(datalst[start:end + 1]) + '\n'
            self.docs['in']['raw'] = '\n'.join(datalst[:start] + datalst[end + 1:])
            data = self.docs['in']['raw']
            start, end = self.dst.get_doctests_indexes(data)
        if self.docs['in']['doctests'] != "":
            data = '\n'.join([d.rstrip().replace(self.docs['out']['spaces'], '', 1) for d in self.docs['in']['doctests'].splitlines()])
            self.docs['out']['doctests'] = data
        return result
def _extract_docs_doctest ( self ) : result = False data = self . docs [ 'in' ] [ 'raw' ] start , end = self . dst . get_doctests_indexes ( data ) while start != - 1 : print ( start , end ) result = True datalst = data . splitlines ( ) if self . docs [ 'in' ] [ 'doctests' ] != "" : self . docs [ 'in' ] [ 'doctests' ] += '\n' self . docs [ 'in' ] [ 'doctests' ] += '\n' . join ( datalst [ start : end + 1 ] ) + '\n' self . docs [ 'in' ] [ 'raw' ] = '\n' . join ( datalst [ : start ] + datalst [ end + 1 : ] ) data = self . docs [ 'in' ] [ 'raw' ] start , end = self . dst . get_doctests_indexes ( data ) if self . docs [ 'in' ] [ 'doctests' ] != "" : data = '\n' . join ( [ d . rstrip ( ) . replace ( self . docs [ 'out' ] [ 'spaces' ] , '' , 1 ) for d in self . docs [ 'in' ] [ 'doctests' ] . splitlines ( ) ] ) self . docs [ 'out' ] [ 'doctests' ] = data return result