-
Notifications
You must be signed in to change notification settings - Fork 635
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
DYN-6985 Get item from list with negative index (Wishlist #187) #15205
DYN-6985 Get item from list with negative index (Wishlist #187) #15205
Conversation
UI Smoke TestsTest: success. 2 passed, 0 failed. |
hi @tinrobot2000 Thanks a lot for proposing this PR, my team will review and make a decision soon on this. Good work on addressing wishlist issue! |
@aparajit-pratap @mjkkirschner Do you think this is as per design to not gte the negative index from the list items? |
If you checkout the builtin implementation of
I think this would be an okay change but it requires the following changes IMO.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-6985
Hi @mjkkirschner I think when index is too large or too negative to handle, it could be out of range so exception is only needed in that case. I am adding unit tests for those cases as well. |
yeah I'm still not getting it - when you do
that will throw an out of range exception, you don't have to detect it yourself first... |
the changes from DynamoDS#15205 require an update here. If the element is not in the list it should return null instead of -1.
Purpose
Update to List.GetItemAtIndex to allow negative index (get from right to left) retrieval
DynamoDS/DynamoWishlist#187
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Update to List.GetItemAtIndex to allow negative index (get from right to left) retrieval
Reviewers
@DynamoDS/dynamo
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of