mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
rename HTMLParser to html.parser and htmlentitydefs to html.entities;
includes merge of trunk revision 63432
This commit is contained in:
parent
9b020c784c
commit
3c50ea4303
9 changed files with 25 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
import test.test_support, unittest
|
||||
import sys, codecs, htmlentitydefs, unicodedata
|
||||
import sys, codecs, html.entities, unicodedata
|
||||
|
||||
class PosReturn:
|
||||
# this can be used for configurable callbacks
|
||||
|
@ -86,7 +86,7 @@ class CodecCallbackTest(unittest.TestCase):
|
|||
l = []
|
||||
for c in exc.object[exc.start:exc.end]:
|
||||
try:
|
||||
l.append("&%s;" % htmlentitydefs.codepoint2name[ord(c)])
|
||||
l.append("&%s;" % html.entities.codepoint2name[ord(c)])
|
||||
except KeyError:
|
||||
l.append("&#%d;" % ord(c))
|
||||
return ("".join(l), exc.end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue