On Wed, 12 Oct 2016, Simon King wrote:
So we have now a common view that 'type' in TypeError should (mostly?) refer to types in wrong class, wrong category etc; and so for functions having no input it should (almost?) never happen.
What about ValueError? After all, in that case, we have a *method* (i.e., a function with one argument "self"), and "self" of course has the correct type but has a wrong value.
Yep, mostly those functions should raise ValueError. (Or, maybe, some error derived from it; but that might be really, really bikeshedding.)
-- Jori Mäntysalo