Skip to content
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

Introduce negative indexing for slices #41768

Closed
x0r19x91 opened this issue Oct 3, 2020 · 2 comments
Closed

Introduce negative indexing for slices #41768

x0r19x91 opened this issue Oct 3, 2020 · 2 comments

Comments

@x0r19x91
Copy link

@x0r19x91 x0r19x91 commented Oct 3, 2020

Currently we have unsigned indexing.
Given a slice L, we can index the nth last element as L[len(L)-n]

Simpler way would be L[-n]

@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Oct 3, 2020

duplicate of #11245 #33359
related to #16231 #20176

@mdlayher
Copy link
Member

@mdlayher mdlayher commented Oct 3, 2020

Closing per above.

@mdlayher mdlayher closed this Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.