diff --git a/src/fparser/two/utils.py b/src/fparser/two/utils.py index 3c711aee..2e9ecf33 100644 --- a/src/fparser/two/utils.py +++ b/src/fparser/two/utils.py @@ -525,7 +525,7 @@ def init(self, *items): Store the supplied list of nodes in the `items` list of this node. :param items: the children of this node. - :type items: tuple of :py:class:`fparser.two.utils.Base` + :type items: Tuple[:py:class:`fparser.two.utils.Base`] """ self.items = items @@ -540,8 +540,11 @@ def __repr__(self): return self.torepr() def _cmpkey(self): - """Provides a key of objects to be used for comparing.""" - return self.items + """ + :returns: a tuple of objects to be used for comparing nodes. + :rtype: Tuple[:py:class:`fparser.two.utils.Base`] + """ + return tuple(list(self.items).append(type(self))) def tofortran(self, tab="", isfix=None): """