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
ghost opened this issue Oct 3, 2020 · 2 comments
Closed

Introduce negative indexing for slices #41768

ghost opened this issue Oct 3, 2020 · 2 comments

Comments

@ghost
Copy link

ghost 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
Member

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

@mdlayher
Copy link
Member

mdlayher commented Oct 3, 2020

Closing per above.

@mdlayher mdlayher closed this as completed Oct 3, 2020
@golang golang locked and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants