Accessing Keys as Class Attributes

In order to access a dictionary key as a class attribute, for a Group or a Metadata object, or the fieldnames of a numpy array in a Dataset, then the following naming rules must be followed:

  • the name matches the regex pattern ^[a-zA-Z][a-zA-Z0-9_]*$ – which states that the name must begin with a letter and is followed by zero or more alphanumeric characters or underscores

  • the name cannot be equal to any of the following:

    • clear

    • copy

    • fromkeys

    • get

    • read_only

    • items

    • keys

    • pop

    • popitem

    • setdefault

    • update

    • values