Skip to content

Normalize BarrelList slice bounds and reverse steps - #471

Merged
mahmoud merged 1 commit into
mahmoud:masterfrom
codewithfourtix:fix-barrellist-slice-bounds
Sep 7, 2026
Merged

mahmoud merged 1 commit into
mahmoud:masterfrom
codewithfourtix:fix-barrellist-slice-bounds

Conversation

@codewithfourtix

Copy link
Copy Markdown
Contributor

Reverse slicing misinterprets explicit bounds, while large negative bounds can reach islice() without being clamped. Normalize with slice.indices() before translating a reverse slice.

Compares positive and negative slices against Python lists, including empty inputs and out-of-range bounds.

@mahmoud
mahmoud merged commit 56161fe into mahmoud:master Sep 7, 2026
1 check passed
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.

2 participants