__init__ method and raising exceptions

NavyJay gaudetteje at gmail.com
Sat Apr 2 09:23:00 EST 2005


Or better yet, define your own string/class exception to catch your
errors.  In my code, things can break in more than a few ways.  In each
case I catch the exception(s) specific to that piece of code, print a
warning message to the user at sys.stdout and raise a new exception to
be caught by my "wrapper" exception clause.




More information about the Python-list mailing list