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
I expected providing a key/index to a search result would descend relative to the search result. However it's unclear what it's doing (see the example below).
>>>importasdf>>>af=asdf.AsdfFile({"a": 1, "b": {"c": [1, 2, 3]}})
>>>af.search("c")
root (AsdfObject)
└─b (dict)
└─c (list): [1, 2, 3]
>>>af.search("c")[0] # I expected this to return 1 since it's the 0th item in "c"KeyError: 0>>>af.search()["a"] # roughly matches the example, suggesting indexing is relative to the roota (int): 1>>>af.search("c")["a"] # maybe this makes sense since there's no "c" in "a"Noresultsfound.
>>>af.search("c")["b"] # maybe this should return "c"?Noresultsfound.
System information
asdf version: main
python version: 3.10
operating system: mac
The text was updated successfully, but these errors were encountered:
Description of the problem
I expected providing a key/index to a search result would descend relative to the search result. However it's unclear what it's doing (see the example below).
The documentation doesn't make it clear what "descending" into a search result means:
https://asdf.readthedocs.io/en/latest/asdf/features.html#descending-into-child-nodes
Example of the problem
System information
asdf version: main
python version: 3.10
operating system: mac
The text was updated successfully, but these errors were encountered: