Hi Guys,
I am back with a doubt again:
I read that we can "raise" and exception in python if our program detects and error condition, e.g.
Now my question is - are we bound to use built-in exceptions only for the "exception type"?Code:def get_num():number = int(raw_input('Enter number: ')) if number < 0:raise ValueError, ' %s is not a positive number' % numberreturn number
The answer seems 'yes' to me. Could someone throw light on this topic please?