def indent(self, indent):
        """with statement support for indenting/dedenting."""
        curr_docparts = self._docparts
        self._docparts = []
        self.indentation += indent
        try:
            yield
        finally:
            self.indentation -= indent
            indented_docparts = self._docparts
            self._docparts = curr_docparts
            self._docparts.append(nest(indent, concat(indented_docparts)))
def indent ( self , indent ) : curr_docparts = self . _docparts self . _docparts = [ ] self . indentation += indent try : yield finally : self . indentation -= indent indented_docparts = self . _docparts self . _docparts = curr_docparts self . _docparts . append ( nest ( indent , concat ( indented_docparts ) ) )
with statement support for indenting/dedenting.