From: Martin v. Löwis Date: Sat, 29 Dec 2007 18:38:41 +0000 (+0000) Subject: Use strings for all entity values, as that is now possible X-Git-Tag: v3.0a3~274 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c90584ecc171a71289c6860b1206ca8031bb96ca;p=thirdparty%2FPython%2Fcpython.git Use strings for all entity values, as that is now possible with a Unicode string type. --- diff --git a/Lib/htmlentitydefs.py b/Lib/htmlentitydefs.py index bcc242024632..e2b7bf1fb885 100644 --- a/Lib/htmlentitydefs.py +++ b/Lib/htmlentitydefs.py @@ -265,9 +265,6 @@ entitydefs = {} for (name, codepoint) in name2codepoint.items(): codepoint2name[codepoint] = name - if codepoint <= 0xff: - entitydefs[name] = chr(codepoint) - else: - entitydefs[name] = '&#%d;' % codepoint + entitydefs[name] = chr(codepoint) del name, codepoint