interpreter use... help?

Skip Montanaro skip at
Mon Aug 6 06:15:42 CEST 2001

    cc> How do I type try and except statements into the interpreter?  I
    cc> know this sounds REALLY REALLY dumb, but I'm having problems.

    cc> Here is what I do:

              except TypeError:

Note that the try: and except ...: clauses have to be at the same
indentation.  That's why you're getting a syntax error.  Also, there has to
be something in the block controlled by the except clause, even if it's just
a pass statement:

    except TypeError:

Skip Montanaro (skip at

More information about the Python-list mailing list