Commit 474a5543 authored by Stefan Behnel's avatar Stefan Behnel

move 'unicode' name in Tempita out of the way of 2to3 in Py3.2

parent 97dda59a
......@@ -43,7 +43,7 @@ import tokenize
from io import StringIO
from ._looper import looper
from .compat3 import bytes, unicode, basestring_, next, is_unicode, coerce_text
from .compat3 import bytes, unicode_, basestring_, next, is_unicode, coerce_text
__all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate',
'sub_html', 'html', 'bunch']
......@@ -328,7 +328,7 @@ class Template(object):
return ''
if self._unicode:
try:
value = unicode(value)
value = unicode_(value)
except UnicodeDecodeError:
value = bytes(value)
else:
......
import sys
__all__ = ['b', 'basestring_', 'bytes', 'unicode', 'next', 'is_unicode']
__all__ = ['b', 'basestring_', 'bytes', 'unicode_', 'next', 'is_unicode']
if sys.version < "3":
b = bytes = str
basestring_ = basestring
unicode = unicode
unicode_ = unicode
else:
def b(s):
......@@ -14,7 +14,7 @@ else:
return bytes(s)
basestring_ = (bytes, str)
bytes = bytes
unicode = str
unicode_ = str
text = str
if sys.version < "3":
......
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