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

Changed: raise KeyError instead of IndexError for all failed lookup methods #135

Merged

Conversation

elliot-100
Copy link
Collaborator

@elliot-100 elliot-100 commented Jun 25, 2024

For get_person(), also make error message more meaningful and add 'Raises' to docstring.

@elliot-100 elliot-100 self-assigned this Jun 25, 2024
@elliot-100
Copy link
Collaborator Author

Let me know if any comments.

@dhomeier: relates to your PR #134

@elliot-100
Copy link
Collaborator Author

Oops, should be be changing to 'KeyError' of course. Will revise.

…up methods; for `get_person()`,also make error message more meaningful and add Raises to docstring.
@elliot-100 elliot-100 force-pushed the 113-raise-keyerror-for-failed-lookup-by-id branch from 8f65a3c to 5263e15 Compare June 25, 2024 15:41
@elliot-100 elliot-100 changed the title Changed: raise LookupError instead of IndexError for all failed lookup methods Changed: raise KeyError instead of IndexError for all failed lookup methods Jun 25, 2024
@elliot-100 elliot-100 marked this pull request as ready for review June 25, 2024 15:42
@elliot-100 elliot-100 linked an issue Jun 25, 2024 that may be closed by this pull request
@elliot-100
Copy link
Collaborator Author

Is it OK if I merge this @Olen?

@Olen
Copy link
Owner

Olen commented Jun 26, 2024

Looks fine

@elliot-100 elliot-100 merged commit 76a63ca into Olen:main Jun 26, 2024
5 checks passed
@elliot-100 elliot-100 deleted the 113-raise-keyerror-for-failed-lookup-by-id branch June 26, 2024 10:18
@elliot-100 elliot-100 added the enhancement New feature or request label Oct 22, 2024
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

Successfully merging this pull request may close these issues.

Discussion: what exception to raise for a failed lookup by id?
2 participants