(self, **kwargs)
return value
Custom format to work with square brackets.
        Converts underscores to hyphens in the variable names.
        Does not throw errors so is safe to use with user input.

        eg. "Sentence with [CUSTOM-VAR]" can be formatted with ".format_custom(CUSTOM_VAR=var)"
Custom format to work with square brackets.
        Converts underscores to hyphens in the variable names.
        Does not throw errors so is safe to use with user input.
Custom format to work with square brackets . Converts underscores to hyphens in the variable names . Does not throw errors so is safe to use with user input .
def format_custom(self, **kwargs):
        """Custom format to work with square brackets.
        Converts underscores to hyphens in the variable names.
        Does not throw errors so is safe to use with user input.

        eg. "Sentence with [CUSTOM-VAR]" can be formatted with ".format_custom(CUSTOM_VAR=var)"
        """
        value = self._data['value']
        for search, replacement in iteritems(kwargs):
            value = value.replace('[{}]'.format(search.replace('_', '-')), str(replacement))
        return value
def format_custom ( self , * * kwargs ) : value = self . _data [ 'value' ] for search , replacement in iteritems ( kwargs ) : value = value . replace ( '[{}]' . format ( search . replace ( '_' , '-' ) ) , str ( replacement ) ) return value