aboutsummaryrefslogtreecommitdiffstats
path: root/mako
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-02-21 10:51:34 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-02-21 10:51:34 -0500
commit1936fc61ef6d61b32324fbdc1e49b44241473b62 (patch)
tree80169d80da55598dfc4ad33664edd82d51f1379d /mako
parent0c75b45911baa52d6a496f689c401102cd6a0b4a (diff)
downloadexternal_python_mako-1936fc61ef6d61b32324fbdc1e49b44241473b62.tar.gz
external_python_mako-1936fc61ef6d61b32324fbdc1e49b44241473b62.tar.bz2
external_python_mako-1936fc61ef6d61b32324fbdc1e49b44241473b62.zip
- fix uncovered bug in FastEncodingBuffer
- misc cleanup
Diffstat (limited to 'mako')
-rw-r--r--mako/_ast_util.py1
-rw-r--r--mako/pyparser.py1
-rw-r--r--mako/template.py4
-rw-r--r--mako/util.py5
4 files changed, 5 insertions, 6 deletions
diff --git a/mako/_ast_util.py b/mako/_ast_util.py
index 41a40c4..9521ccb 100644
--- a/mako/_ast_util.py
+++ b/mako/_ast_util.py
@@ -4,7 +4,6 @@
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
-# -*- coding: utf-8 -*-
"""
ast
~~~
diff --git a/mako/pyparser.py b/mako/pyparser.py
index aaf8125..953596a 100644
--- a/mako/pyparser.py
+++ b/mako/pyparser.py
@@ -1,6 +1,5 @@
# mako/pyparser.py
# Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file>
-# Copyright (C) Mako developers
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
diff --git a/mako/template.py b/mako/template.py
index f93be79..6166895 100644
--- a/mako/template.py
+++ b/mako/template.py
@@ -96,8 +96,8 @@ class Template(object):
Python module file. For advanced usage only.
:param output_encoding: The encoding to use when :meth:`.render`
- is called. See :ref:`usage_unicode` as well as
- :ref:`unicode_toplevel`.
+ is called. Defaults to ``ascii`` as of Mako 0.4.0.
+ See :ref:`usage_unicode` as well as :ref:`unicode_toplevel`.
:param preprocessor: Python callable which will be passed
the full template source before it is parsed. The return
diff --git a/mako/util.py b/mako/util.py
index 3613a5b..5518b4d 100644
--- a/mako/util.py
+++ b/mako/util.py
@@ -112,7 +112,7 @@ class SetLikeDict(dict):
class FastEncodingBuffer(object):
"""a very rudimentary buffer that is faster than StringIO,
- but doesnt crash on unicode data like cStringIO."""
+ but doesn't crash on unicode data like cStringIO."""
def __init__(self, encoding=None, errors='strict', unicode=False):
self.data = collections.deque()
@@ -126,7 +126,8 @@ class FastEncodingBuffer(object):
self.write = self.data.append
def truncate(self):
- self.data =collections.deque()
+ self.data = collections.deque()
+ self.write = self.data.append
def getvalue(self):
if self.encoding: