Maybe the zfec C code could do a precondition check as early as possible and cause an assertion failure that clearly communicates to the programmer what the legal range of the inputs is. The Python wrapper already does this: https://github.com/vu3rdd/zfec/blob/master/zfec/_fecmodule.c#L66 Sincerely, Zooko