[Tutor] Value Error

Jim Mooney cybervigilante at gmail.com
Wed Jun 12 22:49:26 CEST 2013


I'm going through the exceptions so I can recall and use the basic ones
(not much use for unicode errors at this point ;')  But I'm puzzled by an
aspect of the Value Error:
*exception *ValueError

Raised when a built-in operation or function receives an argument that has
the right type but an inappropriate value, and the situation is not
described by a more precise exception such as
IndexError<http://docs.python.org/2/library/exceptions.html#exceptions.IndexError>
.

I know you can bring this error up easily with a wrong user input, but
within a program, what would be an example of something that is the "right
type but an inappropriate value"?
-- 
Jim
A noun is just a verb with the hiccups
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130612/fde615e6/attachment.html>


More information about the Tutor mailing list