Tag Interface

class pytools.tag.Tag[source]

Generic metadata, applied to, among other things, pytato Arrays.

tag_name

A fully qualified DottedName that reflects the class name of the tag.

Instances of this type must be immutable, hashable, picklable, and have a reasonably concise __repr__() of the form dotted.name(attr1=value1, attr2=value2). Positional arguments are not allowed.

__repr__()

Return repr(self).

class pytools.tag.UniqueTag[source]

Only one instance of this type of tag may be assigned to a single tagged object.

Supporting Functionality

class pytools.tag.DottedName(name_parts: Tuple[str, ])[source]
name_parts

A tuple of strings, each of which is a valid Python identifier. No name part may start with a double underscore.

The name (at least morally) exists in the name space defined by the Python module system. It need not necessarily identify an importable object.

classmethod from_class(argcls: Any)pytools.tag.DottedName[source]