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

don't use assert. #219

Closed
Carreau opened this issue May 16, 2016 · 2 comments · Fixed by #253
Closed

don't use assert. #219

Carreau opened this issue May 16, 2016 · 2 comments · Fixed by #253
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented May 16, 2016

Assert is meant optimised out by -O Python, which means that it is not equivalent to raise.
Should be replaced by actual exceptions raising.

Was introduced in #200, slipped through review.

@Carreau Carreau modified the milestone: 4.3 May 17, 2016
@SylvainCorlay
Copy link
Member

Agreed

@minrk
Copy link
Member

minrk commented May 27, 2016

When I look through traitlets, I see asserts only used for argument-type verification. Isn't this exactly what asserts are for, and what -O is meant to optimize-out?

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