On Jul 24, 2007, at 7:21 AM, Andy Davies wrote:

> ... and a *long* time ago (in a PL-SQL for beginners class iirc) I was
> taught that using error trapping code to control normal program  
> flow was
> *naughty*.

        I guess it depends on the language. Exceptions are a normal way of  
working in Python. For example, in many languages you rely on  
returned codes from functions to determine if they completed  
successfully. In Python, the normal thing to do is have the function  
raise an exception, and then handle that exception in the calling  
program.

        When it is designed to work this way, it isn't really "error  
handling"; it's just a routine programming idiom.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to