On Sep 7, 8:13 am, cnb <[EMAIL PROTECTED]> wrote: > if i do > try: > something > except TypeError, IndexError: > pass > > only the first error will get caught. I dont want to use Exception and > catch all errors, but just 2. how can i do that?
The syntax for what you can have between "except" and ":" is: [expression ["," target]] 'target' is an optional name to be bound to the actual exception object that is raised. If you want to catch multiple kinds of exception, 'expression' needs to be a tuple. See http://docs.python.org/tut/node10.html#SECTION0010300000000000000000 and http://docs.python.org/ref/try.html Cheers, John -- http://mail.python.org/mailman/listinfo/python-list