[Q] Are Exceptions used that much in practice?

Jay O'Connor joconnor at cybermesa.com
Tue Dec 12 22:23:02 EST 2000


> > I believe I've been misunderstood.  The problem is not "can I write code
> > without handling exceptions" but rather "are exceptions used
> > voluntarily, rather than by compulsion".
>
> The Python interpreter will throw exceptions.  You are not obligated to
> handle them.
-- 

I think his point is that in Java, when you declare a function , you can
declare if it throws a particular exception


	void myFunction() throws MyException {

	}


This requires (the compiler and language spec enforce) that any calls to
myFunction be wrapped in an excetpion handler that will catch at least
MyException exceptions

No, Python does not enforce this

Take care,
Jay O'Connor
joconnor at cybermesa.com
http://www.cybermesa.com/~joconnor

"God himself plays the bass strings first when He tunes the soul"




More information about the Python-list mailing list