(self, *, extra = None)
A context manager for preparing the source for blocks. It adds
        the character':', increases the indentation on enter and decreases
        the indentation on exit. If *extra* is given, it will be directly
        appended after the colon character.
A context manager for preparing the source for blocks. It adds
        the character':', increases the indentation on enter and decreases
        the indentation on exit. If *extra* is given, it will be directly
        appended after the colon character.
A context manager for preparing the source for blocks . It adds the character : increases the indentation on enter and decreases the indentation on exit . If * extra * is given it will be directly appended after the colon character .
def block(self, *, extra = None):
        """A context manager for preparing the source for blocks. It adds
        the character':', increases the indentation on enter and decreases
        the indentation on exit. If *extra* is given, it will be directly
        appended after the colon character.
        """
        self.write(":")
        if extra:
            self.write(extra)
        self._indent += 1
        yield
        self._indent -= 1
def block ( self , * , extra = None ) : self . write ( ":" ) if extra : self . write ( extra ) self . _indent += 1 yield self . _indent -= 1