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

Inner keys - the keys of "items_dict" should be a frozenset not a tuple #8

Open
jsbueno opened this issue Mar 18, 2015 · 0 comments
Open

Comments

@jsbueno
Copy link
Contributor

jsbueno commented Mar 18, 2015

The main motivation for this is that in the current API in order to update an item, one has to supply all its keys - there is no motive for all the keys to have to be in order.
Using frozenset should also be more efficient, but those gains should be marginal.

However, this change could break some backwards compatibility for the "get_other_keys" method if someone is expecting the key order to be maintained there (however, there is no such order promise, since the result for that function is a rebuilt list, not the key-tuple currently used as key) - I think the return type for it should be a frozeset instead of a list as well.

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