I see your point. Personally, I don't like asserts on production code and I prefer explicit tests and raise an error with a meaningful message. Note that this code will be maintained by, potentially, other people, so useful error messages can help troubleshooting any future issue.

If this is a programmer error (this is what I understand from your quote) why don't raise something like `IncompetentDeveloperError` as in pyqi?