jorisvandenbossche commented on issue #40642:
URL: https://github.com/apache/arrow/issues/40642#issuecomment-2007675276

   Thanks for the catch! Yet another annoying corner case ..
   
   I was wondering if there isn't some existing functionality to "normalize" 
slice objects, and 
https://stackoverflow.com/questions/6246084/sanitize-python-slice pointed to 
https://docs.python.org/3/reference/datamodel.html#slice.indices
   
   We could test if that helps for us. Although for the case above it still 
gives negative start/stop values .. :
   
   ```
   In [3]: slice(-6, -6, -1).indices(5)
   Out[3]: (-1, -1, -1)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to