You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is some nuance to the asserts. I think specific exceptions are more helpful for things that couldn't POSSIBLY be correct. However, in this PR I used an assert intentionally so if someone wanted to load larger data and didn't care about the guardrails they could using python -O to simply ignore the check entirely. I think that may be a cleaner logical separation. What should always halt at exception, and what are nice to have checks that we want to optimize away when running larger problems.
Suggestion: Replace general asserts with specific exceptions based on context.
We currently use a lot of general asserts in the following pattern:
Using specific exceptions -- e.g.,
ValueError
,IndexError
, etc. -- could be more helpful to users.The text was updated successfully, but these errors were encountered: