##// END OF EJS Templates
templater: rewrite docstring of templater.__init__()...
Yuya Nishihara -
r35497:964510dc default
parent child Browse files
Show More
@@ -1434,13 +1434,19 b' class templater(object):'
1434
1434
1435 def __init__(self, filters=None, defaults=None, resources=None,
1435 def __init__(self, filters=None, defaults=None, resources=None,
1436 cache=None, aliases=(), minchunk=1024, maxchunk=65536):
1436 cache=None, aliases=(), minchunk=1024, maxchunk=65536):
1437 '''set up template engine.
1437 """Create template engine optionally with preloaded template fragments
1438 filters is dict of functions. each transforms a value into another.
1438
1439 defaults is dict of default map definitions.
1439 - ``filters``: a dict of functions to transform a value into another.
1440 resources is dict of internal data (e.g. cache), which are inaccessible
1440 - ``defaults``: a dict of symbol values/functions; may be overridden
1441 from user template.
1441 by a ``mapping`` dict.
1442 aliases is list of alias (name, replacement) pairs.
1442 - ``resources``: a dict of internal data (e.g. cache), inaccessible
1443 '''
1443 from user template; may be overridden by a ``mapping`` dict.
1444 - ``cache``: a dict of preloaded template fragments.
1445 - ``aliases``: a list of alias (name, replacement) pairs.
1446
1447 self.cache may be updated later to register additional template
1448 fragments.
1449 """
1444 if filters is None:
1450 if filters is None:
1445 filters = {}
1451 filters = {}
1446 if defaults is None:
1452 if defaults is None:
General Comments 0
You need to be logged in to leave comments. Login now