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

2.0: Reconsider Pairs iteration/getindex API? #52576

Closed
jariji opened this issue Dec 18, 2023 · 1 comment
Closed

2.0: Reconsider Pairs iteration/getindex API? #52576

jariji opened this issue Dec 18, 2023 · 1 comment

Comments

@jariji
Copy link
Contributor

jariji commented Dec 18, 2023

In 1.9,

julia> first(pairs([10,20,30]))
1 => 10

julia> pairs([10,20,30])[1]
10

apparently because first makes an iterator of pairs and getindex makes a dictlike of pairs. I find this complicated. Maybe there is another design possible, perhaps inspired by Dictionaries.jl.

@mbauman
Copy link
Member

mbauman commented Dec 18, 2023

I think this is a specific case of the more wholistic #24019.

@mbauman mbauman closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
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

2 participants