If d.metadata[key] is the access for getting/setting a single AVU, it seems excessive to require client applications to do this:
d.metadata[ key ] = iRODSMeta( key, 'myValue', 'myUnits')
i.e. duplicated mention of the key value.
It's currently required however, and if the first argument to iRODSMeta constructor does not match the __setitem__ assignment key, an error is generated. Much preferable would be this form:
d.metadata[ key ] = iRODSMeta.builder( value='myValue' [, units='myUnits' ])
Which is easy to implement via functools.partial and collections.namedtuple.
If d.metadata[key] is the access for getting/setting a single AVU, it seems excessive to require client applications to do this:
i.e. duplicated mention of the
keyvalue.It's currently required however, and if the first argument to iRODSMeta constructor does not match the
__setitem__assignment key, an error is generated. Much preferable would be this form:Which is easy to implement via
functools.partialandcollections.namedtuple.