Rename 'unicode' to 'str' in its tp_name field. Rename 'str' to 'str8'.

Change all occurrences of unichr to chr.
This commit is contained in:
Guido van Rossum 2007-05-03 17:18:26 +00:00
parent ef87d6ed94
commit 84fc66dd02
17 changed files with 45 additions and 66 deletions

View file

@ -370,7 +370,7 @@ class HTMLParser(markupbase.ParserBase):
c = int(s[1:], 16)
else:
c = int(s)
return unichr(c)
return chr(c)
else:
# Cannot use name2codepoint directly, because HTMLParser supports apos,
# which is not part of HTML 4
@ -378,7 +378,7 @@ class HTMLParser(markupbase.ParserBase):
if HTMLParser.entitydefs is None:
entitydefs = HTMLParser.entitydefs = {'apos':"'"}
for k, v in htmlentitydefs.name2codepoint.items():
entitydefs[k] = unichr(v)
entitydefs[k] = chr(v)
try:
return self.entitydefs[s]
except KeyError: