Commit 5cd2886c by Kenneth Reitz

additional docstrings

parent e501ec27
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""
pystache.core
~~~~~~~~~~~~~
This module provides the main entrance point to Pystache.
"""
from .template import Template from .template import Template
from .view import View from .view import View
from .loader import Loader from .loader import Loader
__all__ = ['Template', 'View', 'Loader', 'render'] __all__ = ['Template', 'View', 'Loader', 'render']
def render(template, context=None, **kwargs): def render(template, context=None, **kwargs):
"""Renders a template string against the given context."""
context = context and context.copy() or {} context = context and context.copy() or {}
context.update(kwargs) context.update(kwargs)
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""
pystache.template
~~~~~~~~~~~~~~~~~
This module provides Pystache's Template class.
"""
import re import re
import cgi import cgi
import collections import collections
...@@ -15,6 +22,7 @@ except ImportError: ...@@ -15,6 +22,7 @@ except ImportError:
literal = unicode literal = unicode
class Modifiers(dict): class Modifiers(dict):
"""Dictionary with a decorator for assigning functions to keys.""" """Dictionary with a decorator for assigning functions to keys."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment