MCPcopy Create free account
hub / github.com/PyTables/PyTables / walk_groups

Method walk_groups

tables/file.py:2308–2322  ·  view source on GitHub ↗

Recursively iterate over groups (not leaves) hanging from where. The where group itself is listed first (preorder), then each of its child groups (following an alphanumerical order) is also traversed, following the same procedure. If where is not supplied, the root

(self, where: Group | str = "/")

Source from the content-addressed store, hash-verified

2306 yield from self.iter_nodes(group, classname)
2307
2308 def walk_groups(self, where: Group | str = "/") -> Generator[Group]:
2309 """Recursively iterate over groups (not leaves) hanging from where.
2310
2311 The where group itself is listed first (preorder), then each of its
2312 child groups (following an alphanumerical order) is also traversed,
2313 following the same procedure. If where is not supplied, the root
2314 group is used.
2315
2316 The where argument can be a path string
2317 or a Group instance (see :ref:`GroupClassDescr`).
2318
2319 """
2320 group = self.get_node(where) # Does the parent exist?
2321 self._check_group(group) # Is it a group?
2322 return group._f_walk_groups()
2323
2324 def _check_open(self) -> None:
2325 """Check the state of the file.

Callers 12

walk_nodesMethod · 0.95
__str__Method · 0.95
__repr__Method · 0.95
test03_TraverseTreeMethod · 0.80
test02_walkGroupsMethod · 0.80
test02_filtersMethod · 0.80
table-tree.pyFile · 0.80
tutorial1-2.pyFile · 0.80
tutorial1.pyFile · 0.80
read_fileFunction · 0.80
read_fieldFunction · 0.80
copy-bench.pyFile · 0.80

Calls 3

get_nodeMethod · 0.95
_check_groupMethod · 0.95
_f_walk_groupsMethod · 0.80

Tested by 3

test03_TraverseTreeMethod · 0.64
test02_walkGroupsMethod · 0.64
test02_filtersMethod · 0.64