def set_autoindent(self, value=None):
    'Set the autoindent flag.\n\n        If called with no arguments, it acts as a toggle.'
    if (value is None):
        self.autoindent = (not self.autoindent)
    else:
        self.autoindent = value
Set the autoindent flag.

If called with no arguments, it acts as a toggle.
def set_autoindent(self, value=None):
    'Set the autoindent flag.\n\n        If called with no arguments, it acts as a toggle.'
    if (value is None):
        self.autoindent = (not self.autoindent)
    else:
        self.autoindent = value