-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
API designtopic-DataTreeRelated to the implementation of a DataTree classRelated to the implementation of a DataTree class
Description
What is your issue?
Summarizing xarray-contrib/datatree#240 (comment):
Basically DataTree.__getitem__ will currently return more things than DataTree.__contains__ will actually tell you are "in" the tree, which can be confusing.
To fix this __contains__ should support path-like syntax.
I also think that it's convenient that we can separate the "is this key in the local node's variables" question from the "is this path in the tree anywhere" question. In the former case the key will never have a
/character and the latter case it will always have one, so we could perhaps think of this like overloading the__contains__method to behave slightly differently forstrvsPathLiketypes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
API designtopic-DataTreeRelated to the implementation of a DataTree classRelated to the implementation of a DataTree class