Closed moggers87 closed 4 years ago
There are places in Salmon where assertions are used to protect against programming errors, e.g. https://github.com/moggers87/salmon/blob/6a0345aea423550fc9135ac2eafa84bb75f9aade/salmon/bounce.py#L284-L288
This is no good as assertions are dropped if optimisation is requested: https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement
Assertions should be swapped for something that raises a more appropriate exception.
There are places in Salmon where assertions are used to protect against programming errors, e.g. https://github.com/moggers87/salmon/blob/6a0345aea423550fc9135ac2eafa84bb75f9aade/salmon/bounce.py#L284-L288
This is no good as assertions are dropped if optimisation is requested: https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement
Assertions should be swapped for something that raises a more appropriate exception.