You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the mission to make working with metadata as close to dicts (and pythonic) as possible there is not that much missing. For the object creation, the properties side of things has been solved with pr #101. The thing that remains is creation of sections, currently done via section.create_section('name', 'type')
Following ideas came to my mind:
Create section via __setitem__ and a tuple, i.e. s['new section'] = ('type'). If people fear that this is too confusing to value creation (which is done via lists, i.e. s['prop'] = [1, 2, 3]) then maybe we could introduce a dummy class (e.g. a collections.namedtuple) with a short name (nix.S): s['new section'] = nix.S('type').
I think I personally prefer the first version, i.e. the tuple based approach.
The text was updated successfully, but these errors were encountered:
On the mission to make working with metadata as close to dicts (and pythonic) as possible there is not that much missing. For the object creation, the properties side of things has been solved with pr #101. The thing that remains is creation of sections, currently done via
section.create_section('name', 'type')
Following ideas came to my mind:
Create section via
__setitem__
and a tuple, i.e.s['new section'] = ('type')
. If people fear that this is too confusing to value creation (which is done via lists, i.e.s['prop'] = [1, 2, 3]
) then maybe we could introduce a dummy class (e.g. acollections.namedtuple
) with a short name (nix.S
):s['new section'] = nix.S('type')
.I think I personally prefer the first version, i.e. the tuple based approach.
The text was updated successfully, but these errors were encountered: