Skip to content

Commit 7491e00

Browse files
committed
fixup! Speed up unnecessarily slow and obtuse dict comparison
1 parent 666fdbb commit 7491e00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

html5lib/html5parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,9 @@ def __init__(self, parser, tree):
940940
self.endTagHandler.default = self.endTagOther
941941

942942
def isMatchingFormattingElement(self, node1, node2):
943-
return (node1.name == node2.name and node1.namespace ==
944-
node2.namespace and node1.attributes == node2.attributes)
943+
return (node1.name == node2.name and
944+
node1.namespace == node2.namespace and
945+
node1.attributes == node2.attributes)
945946

946947
# helper
947948
def addFormattingElement(self, token):

0 commit comments

Comments
 (0)