[Q] Are Exceptions used that much in practice?
Paul Prescod
paulp at ActiveState.com
Tue Dec 12 02:57:17 EST 2000
Jerome Mrozak wrote:
>
> I realize that Python allows me to catch exceptions. But being a novice
> I'm not sure if they are used much in the 'real world'.
Yes. For instance if
* a file cannot be opened,
* a network socket goes down,
* a user hits Ctrl-C,
* an XML file has a typo in it,
* ...
For various reasons you might want to catch all of these circumstances.
Paul Prescod
More information about the Python-list
mailing list