exception handling in complex Python programs
magloca
magloca at mailinater.com
Thu Aug 21 13:48:45 EDT 2008
Bruno Desthuilliers @ Thursday 21 August 2008 17:31:
>>> If you mean "the exceptions *explicitely raised* by your code", then
>>> I agree. But with any generic enough code, documenting any possible
>>> exception that could be raised by lower layers, objects passed in as
>>> arguments etc is just plain impossible. Like, if you have a function
>>> that takes a file-like object as arg, you just cannot know in
>>> advance what exceptions this object might raise.
>>>
>>
>> This is one of the main concerns with which I started this c.l.py
>> thread ! I think it's a pity that we have no way of anticipating and
>> constraining the exceptions thrown by our code,
>
> Java's "checked exception" system has proven to be a total disaster.
Could you elaborate on that? I'm not disagreeing with you (or agreeing,
for that matter); I'd just really like to know what you mean by
a "total disaster."
m.
More information about the Python-list
mailing list