exceptions

Peter Hansen peter at engcorp.com
Mon May 31 08:19:54 EDT 2004


Zunbeltz Izaola wrote:
> I've the following problem with try/exception.
> I've a try block that will raise some exceptions.
> I want the program to ignore this exceptions completely. 
> Is it possible?

In the following, all exceptions will be ignored:

try:
      # something that raises exceptions
except:
     pass

This is definitely *not* a recommended way to write software,
however.  You should really understand what you are doing before
writing code this way.

-Peter



More information about the Python-list mailing list