Skip to content

Return null when a slice step is 0 - #370

Open
gyanu2507 wants to merge 1 commit into
jmespath:developfrom
gyanu2507:fix/zero-step-slice
Open

Return null when a slice step is 0#370
gyanu2507 wants to merge 1 commit into
jmespath:developfrom
gyanu2507:fix/zero-step-slice

Conversation

@gyanu2507

Copy link
Copy Markdown

[::0] raised ValueError: slice step cannot be zero. Other failed projections (slicing a non-array) already return null.

value[::0] raises ValueError in Python. A projection that cannot
run should be null, same as slicing a non-array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant