Skip to content

Review usage of assert statements in implementation code #42

@sbellem

Description

@sbellem

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions