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

get by index #93

Open
ExpandingMan opened this issue Oct 13, 2022 · 0 comments
Open

get by index #93

ExpandingMan opened this issue Oct 13, 2022 · 0 comments

Comments

@ExpandingMan
Copy link
Contributor

I not infrequently want to get itens from an OrderedDict by their index. There doesn't seem to be a public-facing API for this, I usually use dict.keys. As this is unlikely to break I suggest we add a function. Note that keys(dict)[idx] does not work because keys returns a non-indexable KeySet. It might be nice to create an indexable KeySet object, though that seems like more effort than this problem calls for.

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

No branches or pull requests

1 participant