MCPcopy Index your code
hub / github.com/clips/pattern / traverse

Method traverse

pattern/vector/__init__.py:1588–1594  ·  view source on GitHub ↗

Calls the given visit() function on this cluster and each nested cluster, breadth-first.

(self, visit=lambda cluster: None)

Source from the content-addressed store, hash-verified

1586 return a
1587
1588 def traverse(self, visit=lambda cluster: None):
1589 """ Calls the given visit() function on this cluster and each nested cluster, breadth-first.
1590 """
1591 visit(self)
1592 for item in self:
1593 if isinstance(item, Cluster):
1594 item.traverse(visit)
1595
1596 def __repr__(self):
1597 return "Cluster(%s)" % list.__repr__(self)[1:-1]

Callers 1

clusterMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected