diff --git a/cldoc/nodes/field.py b/cldoc/nodes/field.py index c171a13..65a6658 100644 --- a/cldoc/nodes/field.py +++ b/cldoc/nodes/field.py @@ -23,6 +23,8 @@ def __init__(self, cursor, comment): self.type = Type(cursor.type, cursor=cursor) def compare_same(self, other): + def cmp(a, b): + return (a > b) - (a < b) return cmp(self.sort_index, other.sort_index) # vi:ts=4:et diff --git a/cldoc/nodes/function.py b/cldoc/nodes/function.py index 1b0663a..aaa125f 100644 --- a/cldoc/nodes/function.py +++ b/cldoc/nodes/function.py @@ -99,8 +99,6 @@ def __init__(self, cursor, comment): @property def semantic_parent(self): - from namespace import Namespace - parent = self.parent while not parent is None and not isinstance(parent, Namespace):