def __init__(self, text, **kwargs):
        """Constructor.

        :param text: A string to add to the message.
        :type text: str

        We pass the kwargs on to the base class so an exception is raised
        if invalid keywords were passed. See:

        http://stackoverflow.com/questions/13124961/
        how-to-pass-arguments-efficiently-kwargs-in-python
        """
        if 'style_class' in kwargs:
            my_class = '%s prettyprint' % kwargs['style_class']
            kwargs['style_class'] = my_class
        super(PreformattedText, self).__init__(**kwargs)

        self.text = text
def __init__ ( self , text , ** kwargs ) : if 'style_class' in kwargs : my_class = '%s prettyprint' % kwargs [ 'style_class' ] kwargs [ 'style_class' ] = my_class super ( PreformattedText , self ) . __init__ ( ** kwargs ) self . text = text
Constructor.

        :param text: A string to add to the message.
        :type text: str

        We pass the kwargs on to the base class so an exception is raised
        if invalid keywords were passed. See:

        http://stackoverflow.com/questions/13124961/
        how-to-pass-arguments-efficiently-kwargs-in-python