Changing exceptions to be ValueError or a subclass thereof in cases wher...

...e the error is invalid input.

Please see this page for a definition of ValueError, which should make clear why it is more appropriate: http://docs.python.org/2/library/exceptions.html#exceptions.ValueError