[Q] Are Exceptions used that much in practice?
paulp at ActiveState.com
Wed Dec 13 02:47:32 CET 2000
Jerome Mrozak wrote:
> The point of the question is this -- is code like this sample a way of
> exercising the try-catch, or is this an example of something I end up
> doing all of the time because it is so much easier than the alternative?
I've read both your emails a few times and I still don't really
understand the question.
Python users like exception handling. They tend to like almost
everything about Python's exception handling. Python users implement
code that throws exceptions and Python users implement code that catches
exceptions. Arguably Python forces them to do the latter but not the
Does that help?
> The long-range goal of my question is to determine for my satisfaction
> whether it is worth while for me to spend my limited time pursuing
> Python as a compliment to (whatever other skills I might have) or to go
> with the apparently much greater flow and use those resources on Perl.
> The 'exception' thing could be a determiner, esp. with nothing similar
> in Perl, but only if I can use it in a *positive* way instead of just to
> test a return value. Heck, Perl has 'die' for that kind of testing.
Over the years, Perl has added features to make its exception handling
more and more like Python's. I expect this trend will continue with Perl
I would not suggest that this is a basis for making the decision between
the two languages. It's not exactly a killer feature.
More information about the Python-list