def replaceDiscard(self, node):
    """
    Replace a single discard statement with a series of statements
    that write out the string. 
    """
    # Only operate on constant expressions
    if not isinstance(node.expr, ast.Const):
      return [node]

    value = self.TEXT_RE.sub(r"\1",node.expr.value)
    
    # This code replaces each template string
    subst = """
__mapper = __EvalMapper(globals(), locals())
__template_fd.write(__StringTemplate(%s).safe_substitute(__mapper))
""" % value.__repr__()

    module = compiler.parse(subst)
    nodes = module.node.nodes
        
    return nodes

    Replace a single discard statement with a series of statements
    that write out the string. 
    
recipes/Python/440629_Good_enough_templating/recipe-440629.py