Mercurial > cpython-lru_cache-weakref
diff Lib/HTMLParser.py @ 41585:825d966338ea
Rename 'unicode' to 'str' in its tp_name field. Rename 'str' to 'str8'.
Change all occurrences of unichr to chr.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 03 May 2007 17:18:26 +0000 |
| parents | beacf40b5960 |
| children | c6fb393b6c81 |
line wrap: on
line diff
--- a/Lib/HTMLParser.py Wed May 02 19:09:54 2007 +0000 +++ b/Lib/HTMLParser.py Thu May 03 17:18:26 2007 +0000 @@ -370,7 +370,7 @@ 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 @@ 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:
