-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get/set inconsistency for fractional array indices #2815
Comments
Had a vague memory of seeing this before, but can't find any jq issue about... but turns i reported it for gojq itchyny/gojq#194 some time ago :) I guess jq should behave the same as gojq? |
I don't know what it should do but I'd expect it to either fail or be a lawful lens. |
What's not fine is the current inconsistency. Which behavior is best? |
I think it should behave the same as out-of-bounds negative indices (so the first option). This also reduces the extent of the breaking change. |
We're also inconsistent w.r.t. the indices in slices:
Fun! |
Another inconsistency:
|
Got curious about |
Ah sorry for the noise, now i see how it works 👍 |
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: