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

returns optional pattern #522

Open
hughes036 opened this issue Oct 1, 2024 · 0 comments
Open

returns optional pattern #522

hughes036 opened this issue Oct 1, 2024 · 0 comments
Labels

Comments

@hughes036
Copy link
Collaborator

Our practice of doing null checks on fields returned by getters whose value can be null (in order to satify mypy linter) really feels like an anti pattern, especially when we handle null values by throwing an error

#519 (comment)

Could the error just be thrown internal to the getter, for violating an invariant?

We need research into how type checking in Python should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant