1
0
mirror of https://github.com/django/django.git synced 2025-10-29 00:26:07 +00:00

[py3] Replaced unicode/str by six.text_type/bytes.

This commit is contained in:
Aymeric Augustin
2012-07-20 14:48:51 +02:00
parent 3cb2457f46
commit bdca5ea345
96 changed files with 376 additions and 294 deletions

View File

@@ -125,14 +125,14 @@ class Element(object):
output += ' %s' % key
if self.children:
output += '>\n'
output += ''.join(unicode(c) for c in self.children)
output += ''.join(six.text_type(c) for c in self.children)
output += '\n</%s>' % self.name
else:
output += ' />'
return output
def __repr__(self):
return unicode(self)
return six.text_type(self)
class RootElement(Element):
@@ -140,7 +140,7 @@ class RootElement(Element):
super(RootElement, self).__init__(None, ())
def __unicode__(self):
return ''.join(unicode(c) for c in self.children)
return ''.join(six.text_type(c) for c in self.children)
class Parser(HTMLParser):