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

Allow positional arguments in m #271

Open
gilch opened this issue Apr 4, 2023 · 0 comments
Open

Allow positional arguments in m #271

gilch opened this issue Apr 4, 2023 · 0 comments

Comments

@gilch
Copy link

gilch commented Apr 4, 2023

The other collections have a way to construct them without going through some other data structure first. PMap does too, but it only works if the keys are string identifiers. If you need some other type of key, then you'd have to construct a dict first.

Clojure has a hash-map constructor that doesn't require some other mapping. If m could accept positional arguments, it could work the same way: args[::2] would be the keys and args[1::2] would be values. This could be in addition to the kwargs it already accepts, so it would not be a breaking change.

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