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

Class Group

tables/group.py:39–1132  ·  view source on GitHub ↗

Basic PyTables grouping structure. Instances of this class are grouping structures containing *child* instances of zero or more groups or leaves, together with supporting metadata. Each group has exactly one *parent* group. Working with groups and leaves is similar in many ways to

Source from the content-addressed store, hash-verified

37
38
39class Group(hdf5extension.Group, Node):
40 """Basic PyTables grouping structure.
41
42 Instances of this class are grouping structures containing *child*
43 instances of zero or more groups or leaves, together with
44 supporting metadata. Each group has exactly one *parent* group.
45
46 Working with groups and leaves is similar in many ways to working
47 with directories and files, respectively, in a Unix filesystem.
48 As with Unix directories and files, objects in the object tree are
49 often described by giving their full (or absolute) path names.
50 This full path can be specified either as a string (like in
51 '/group1/group2') or as a complete object path written in *natural
52 naming* schema (like in file.root.group1.group2).
53
54 A collateral effect of the *natural naming* schema is that the
55 names of members in the Group class and its instances must be
56 carefully chosen to avoid colliding with existing children node
57 names. For this reason and to avoid polluting the children
58 namespace all members in a Group start with some reserved prefix,
59 like _f_ (for public methods), _g_ (for private ones), _v_ (for
60 instance variables) or _c_ (for class variables). Any attempt to
61 create a new child node whose name starts with one of these
62 prefixes will raise a ValueError exception.
63
64 Another effect of natural naming is that children named after
65 Python keywords or having names not valid as Python identifiers
66 (e.g. class, $a or 44) can not be accessed using the node.child
67 syntax. You will be forced to use node._f_get_child(child) to
68 access them (which is recommended for programmatic accesses).
69
70 You will also need to use _f_get_child() to access an existing
71 child node if you set a Python attribute in the Group with the
72 same name as that node (you will get a NaturalNameWarning when
73 doing this).
74
75 Parameters
76 ----------
77 parentnode
78 The parent :class:`Group` object.
79 name : str
80 The name of this node in its parent group.
81 title
82 The title for this group
83 new
84 If this group is new or has to be read from disk
85 filters : Filters
86 A Filters instance
87
88
89 .. versionchanged:: 3.0
90 *parentNode* renamed into *parentnode*
91
92 Notes
93 -----
94 The following documentation includes methods that are automatically
95 called when a Group instance is accessed in a special way.
96

Callers 2

_g_copyMethod · 0.85
create_groupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected