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

Review usage of assert statements in implementation code #42

Open
sbellem opened this issue Aug 24, 2018 · 0 comments
Open

Review usage of assert statements in implementation code #42

sbellem opened this issue Aug 24, 2018 · 0 comments
Assignees
Labels
code quality Coding conventions, etc performance security Security related issue
Milestone

Comments

@sbellem
Copy link
Collaborator

sbellem commented Aug 24, 2018

In some places assert statements are being used to perform some kind of validation, e.g.: type of an argument, value of an argument, etc.

These statements should be replaced with proper validation mechanisms that will raise an appropriate Exception and do whatever is necessary from the point of view of the protocol, because such assert statements may be removed if optimization is turned on. From the Python docs:

The current code generator emits no code for an assert statement when optimization is requested at compile time.

Resources

@sbellem sbellem self-assigned this Aug 24, 2018
@sbellem sbellem added code quality Coding conventions, etc security Security related issue labels Aug 24, 2018
@sbellem sbellem added this to the 1.0 milestone Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Coding conventions, etc performance security Security related issue
Projects
None yet
Development

No branches or pull requests

1 participant