Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae6520f

Browse files
committed
Removedprint() from library code and 3to2 leftovers
1 parente674941 commitae6520f

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

‎html5lib/ihatexml.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ def escapeRegexp(string):
171171
"[","]","|","(",")","-")
172172
forcharinspecialCharacters:
173173
string=string.replace(char,"\\"+char)
174-
ifcharinstring:
175-
print(string)
176174

177175
returnstring
178176

‎html5lib/serializer/htmlserializer.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
try:
88
fromfunctoolsimportreduce
9-
pass# no-op statement to avoid 3to2 introducing parse error
109
exceptImportError:
1110
pass
1211

@@ -35,11 +34,7 @@
3534
iflen(v)==2:
3635
v=utils.surrogatePairToCodepoint(v)
3736
else:
38-
try:
39-
v=ord(v)
40-
except:
41-
print(v)
42-
raise
37+
v=ord(v)
4338
ifnotvinencode_entity_mapork.islower():
4439
# prefer < over < and similarly for &, >, etc.
4540
encode_entity_map[v]=k

‎html5lib/treebuilders/etree_lxml.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,7 @@ def insertRoot(self, token):
323323
ifself.doctype.name!=token["name"]:
324324
warnings.warn("lxml cannot represent doctype with a different name to the root element",DataLossWarning)
325325
docStr+="<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>"
326-
327-
try:
328-
root=etree.fromstring(docStr)
329-
exceptetree.XMLSyntaxError:
330-
print(docStr)
331-
raise
326+
root=etree.fromstring(docStr)
332327

333328
# Append the initial comments:
334329
forcomment_tokeninself.initial_comments:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp