Commit abe5700e by Chris Jerdonek

Adjusted the Render.__init__() docstring.

parent 0b41209d
...@@ -31,19 +31,20 @@ class Renderer(object): ...@@ -31,19 +31,20 @@ class Renderer(object):
output_encoding: the encoding to use when rendering to a string. output_encoding: the encoding to use when rendering to a string.
The argument should be the name of an encoding as a string, for The argument should be the name of an encoding as a string, for
example "utf-8". See the render() method's documentation for more example "utf-8". See the render() method's documentation for
information. more information.
escape: the function used to escape mustache variable values escape: the function used to escape mustache variable values
when rendering a template. The function should accept a unicode when rendering a template. The function should accept a
string and return an escaped string of the same type. It need unicode string and return an escaped string of the same type.
not handle strings of type `str` because this class will only This function need not handle strings of type `str` because
pass it unicode strings. The constructor assigns this escape this class will only pass it unicode strings. The constructor
function to the constructed instance's Template.escape() method. assigns this function to the constructed instance's escape()
method.
The argument defaults to markupsafe.escape when markupsafe is The argument defaults to markupsafe.escape when markupsafe
importable and cgi.escape otherwise. To disable escaping entirely, is importable and cgi.escape otherwise. To disable escaping
one can pass `lambda s: s` as the escape function, for example. entirely, one can pass `lambda u: u` as the escape function,
for example.
default_encoding: the name of the encoding to use when converting default_encoding: the name of the encoding to use when converting
to unicode any strings of type `str` encountered during the to unicode any strings of type `str` encountered during the
......
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