Author: | Francesc Altet |
---|---|
Contact: | faltet@carabos.com |
Author: | Ivan Vilata i Balaguer |
Contact: | ivilata@carabos.com |
This document details the modifications to PyTables since version 1.1. Its main purpose is help you ensure that your programs will be runnable when you switch from PyTables 1.1 to PyTables 1.2.
The user is now allowed to set arbitrary Python (non-persistent) attributes on any instance of Node. If the name matches that of a child node, the later will no longer be accessible via natural naming, but it will still be available via File.getNode(), Group._f_getChild() and the group children dictionaries.
Of course, this allows the user to overwrite internal (^_[cfgv]_) PyTables variables, but this is the way most Python packages work.
The new Group._f_getChild() method allows to get a child node (be it visible or not) by its name. This should be more intuitive that using getattr() or using the group children dictionaries.
The new File.isVisibleNode(), Node._f_isVisible() and Leaf.isVisible() methods tell whether a node is visible or not, i.e. if the node will appear in listing operations such as Group._f_listNodes().
The objects, groups and leaves mappings in File are retained only for compatibility purposes. Using File.getNode() is recommended to access nodes, File.__contains__() to check for node existence, and File.walkNodes() for iteration purposes. Using isinstance() and *isVisible*() methods is the preferred way of checking node type and visibility.
Please note that the aforementioned mappings use the named methods internally, so the former have no special performance gains over the later.