pyltk/pyltk/formatter.py

14 lines
280 B
Python

# -*- encoding: utf-8 -*-
class formatter:
""" Simple formatter class. """
def __init__(self, templates):
self.templates = templates
def format(self, key, data):
""" Format the internal state. """
return self.templates[key].format(**data)