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

Method __repr__

tables/file.py:2997–3013  ·  view source on GitHub ↗

Return a detailed string representation of the object tree.

(self)

Source from the content-addressed store, hash-verified

2995 return "\n".join(lines) + "\n"
2996
2997 def __repr__(self) -> str:
2998 """Return a detailed string representation of the object tree."""
2999 if not self.isopen:
3000 return "<closed File>"
3001
3002 # Print all the nodes (Group and Leaf objects) on object tree
3003 lines = [
3004 f"File(filename={self.filename!s}, title={self.title!r}, "
3005 f"mode={self.mode!r}, root_uep={self.root_uep!r}, "
3006 f"filters={self.filters!r})"
3007 ]
3008 for group in self.walk_groups("/"):
3009 lines.append(f"{group}")
3010 for kind in self._node_kinds[1:]:
3011 for node in self.list_nodes(group, kind):
3012 lines.append(f"{node!r}")
3013 return "\n".join(lines) + "\n"
3014
3015 def _update_node_locations(self, oldpath: str, newpath: str) -> None:
3016 """Update location information of nodes under `oldpath`.

Callers

nothing calls this directly

Calls 3

walk_groupsMethod · 0.95
list_nodesMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected