Skip to content

use reversed(...) to better represent scope iteration - #861

Merged
asottile merged 1 commit into
mainfrom
reversed-scopes
Sep 1, 2026
Merged

asottile merged 1 commit into
mainfrom
reversed-scopes

Conversation

@asottile

@asottile asottile commented Sep 1, 2026

Copy link
Copy Markdown
Member

this might be slightly faster (avoids a list copy)? my macro-benchmark didn't show any noticeable difference.

however it's definitely more readable -- and significantly less confusing (I spent a bit puzzling over what [-1::-1] even means -- turns out it's the same as [::-1]!)

@asottile
asottile merged commit cff063f into main Sep 1, 2026
11 checks passed
@asottile
asottile deleted the reversed-scopes branch September 1, 2026 18:15
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