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

Stores should raise LookupError instead of KeyError #68

Open
thorwhalen opened this issue Jul 14, 2020 · 0 comments
Open

Stores should raise LookupError instead of KeyError #68

thorwhalen opened this issue Jul 14, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@thorwhalen
Copy link
Member

LookupError is the mother of both KeyError and IndexError, which is used by some containers.

"Index" seems to refer to an incremental integer key.

In py2store containers though, keys are meant have (unless otherwise specified) a looser semantic. They can actually be anything (even a non-hashable) that references some content.

Therefore, it may be better, at least at the base(r) levels that we use LookupError instead of what is used now: KeyError.

@thorwhalen thorwhalen added the enhancement New feature or request label Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant