(self, format)
return self
Set the output format for the class instance.
Set the output format for the class instance.
Set the output format for the class instance .
def set_output_format(self, format):
        """ Set the output format for the class instance. """
        try:
            self.serializer = self.output_formats[format.lower()]
        except KeyError:
            raise KeyError('Invalid Output Format: "%s". Use one of %s.' \
                               % (format, self.output_formats.keys()))
        return self
def set_output_format ( self , format ) : try : self . serializer = self . output_formats [ format . lower ( ) ] except KeyError : raise KeyError ( 'Invalid Output Format: "%s". Use one of %s.' % ( format , self . output_formats . keys ( ) ) ) return self