Daniel Fackrell unlearned at
Mon Aug 5 16:37:02 EDT 2002

"Jonas Geiregat" <kemu at> wrote in message
news:3d4ee05a$0$271$ba620e4c at
> what is wrong here try:     raise IndexError except:     print
> sys.exc_info(  ) this come's from o'reilly's book on python and it give me
> an error =>
> IndentationError: unindent does not match any outer indentation level
> 3)

I'm not sure how your original indentation looked (perhaps it was destroyed
by my mail reader or something else along the way), but as far as I can tell
the indentation for this code should look something like this:

    raise IndexError
    print sys.exc_info()

The entire block could be indented also, but it is necessary for the try:
and except: to line up vertically.  Also, be aware that mixing tabs and
spaces can cause problems, especially if the settings in your editor and
your current python settings do not match up.

Does that help?

Daniel Fackrell (unlearned at
When we attempt the impossible, we can experience true growth.

More information about the Python-list mailing list