WrightTools.data.Data.get

Data.get(name, default=None, getclass=False, getlink=False)

Retrieve an item or other information.

“name” given only:

Return the item, or “default” if it doesn’t exist

“getclass” is True:

Return the class of object (Group, Dataset, etc.), or “default” if nothing with that name exists

“getlink” is True:

Return HardLink, SoftLink or ExternalLink instances. Return “default” if nothing with that name exists.

“getlink” and “getclass” are True:

Return HardLink, SoftLink and ExternalLink classes. Return “default” if nothing with that name exists.

Example:

>>> cls = group.get('foo', getclass=True)
>>> if cls == SoftLink: