What type of error should i raise if the the size of some list is not a multiple of some value?
Consider the following code snippet:
def func(x: []):
if ( len(x) % 2) != 0:
raise WhatError("?")
# ...
I have considered TypeError
, ValueError
and IndexError
but I don't think any one of these fit my problem.
Are there an errortype for this type of problem or should I just bite the bullet and use one of these?