Hi

This is a noob question, but here goes. I have a class that calls a
function.


class test:
      def __init__(self):
            if foo():
                 print "it worked"
            else:
                 print "error"


def foo():
    some test returns 1 or 0

Now in other langs like C / C++ I catch the error in foo and report and
exit.
However I suspect in python that I can raise it and the class can catch
it ?

Guess I'm new to Traceback's ,etc

Seeking Python Zen :)

Marinus

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to