+1 from me on this specific case. On the other hand, there are similar arbitrariness in other cases. So I think there should be a broader discussion on what error should be raised in what situation in mathematical context. This is what I think:
A method (or function) takes objects as input and computes an output. The INPUT block defines coarsely the intended class of mathematical objects. TypeError: the type (that can be checked by isinstance(obj, class)) of the input object does not belong to the intended class of mathematical objects ValueError: the particular input object is not suitable as input ArithmeticError: the particular input object is not suitable for arithmetic (sum, product, quotient, and the like) operation ZeroDivisionError: the method performs division but the input is zero NotImplementedError: there is no problem with the input object but the method is incapable to compute appropriate output. RuntimeError: The method somehow cannot perform the computation. Perhaps a catchall error. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/67011ff0-bd47-4399-8078-096e9312448bn%40googlegroups.com.