-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
The documentation of resolve_matching_names_values says:
| def resolve_matching_names_values( |
If the :attr:
preserve_orderis True, the ordering of the matched indices and names is the same as the order of the provided list of strings. This means that the ordering is dictated by the order of the target strings and not the order of the query regular expressions.
If the :attr:
preserve_orderis False, the ordering of the matched indices and names is the same as the order of the provided list of query regular expressions.
but the example appears to show the exact opposite behavior:
For example, consider the dictionary is {"a|d|e": 1, "b|c": 2}, the list of strings is ['a', 'b', 'c', 'd', 'e']. If :attr:
preserve_orderis False, then the function will return the indices of the matched strings, the matched strings, and the values as: ([0, 1, 2, 3, 4], ['a', 'b', 'c', 'd', 'e'], [1, 2, 2, 1, 1]).
That example shows preserve_order=False, but the list of returned indices is clearly the same as the order of the list_of_strings, which is the opposite of what the previous part of the docstring says.
I think the docstring only makes sense if you interpret "provided list of strings" as "keys in the data dictionary", but that doesn't make sense given that there is a variable named list_of_strings.
System Info
Describe the characteristic of your environment:
- Commit: 79fc49d
Checklist
- I have checked that there is no similar issue in the repo (required)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo