summaryrefslogtreecommitdiff
path: root/sandbox/rstdiff/rstdiff.py
diff options
context:
space:
mode:
authorsmerten <smerten@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-07-03 21:17:44 +0000
committersmerten <smerten@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-07-03 21:17:44 +0000
commite52af9c5690736d7e7a96fe5bd8b79c8e85ce82d (patch)
tree1d57789bf27499193e395353ce6443fcf77a19e7 /sandbox/rstdiff/rstdiff.py
parent83f505337c1876d210166fa02a90025ce2dd337c (diff)
downloaddocutils-e52af9c5690736d7e7a96fe5bd8b79c8e85ce82d.tar.gz
Minor improvement.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6353 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/rstdiff/rstdiff.py')
-rwxr-xr-xsandbox/rstdiff/rstdiff.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sandbox/rstdiff/rstdiff.py b/sandbox/rstdiff/rstdiff.py
index ceb944bdd..17e08039d 100755
--- a/sandbox/rstdiff/rstdiff.py
+++ b/sandbox/rstdiff/rstdiff.py
@@ -377,8 +377,8 @@ class DocutilsDispatcher(HashableNodeImpl):
return self.dispatchClass('childHash', node)
def childHash_UNKNOWN(self, node):
- # TODO Is this correct *and* good?
- return hash(node.__class__)
+ # By default compare as a child by comparing children
+ return self.childrenHash(node)
def childEq(self, node, other):
"""Returns equality of `node` and an `other` node as children.
@@ -387,7 +387,6 @@ class DocutilsDispatcher(HashableNodeImpl):
this."""
# Only nodes of the same class can be equal - this assumption
# is used in many places
- # TODO Is this correct?
if node.__class__ != other.__class__:
return False
return self.dispatchClass('childEq', node, other)