[Phillip J. Eby] > I think the main problem is going to be that (IIUC), Python doesn't "know" > when you've exited an 'except:' clause and are therefore no longer > handling the exception.
But the compiler knows and could insert code to maintain this state. > sys.exc_info() still gives you the exception you > just caught. I think that a lot of the questions Guido brought up are > directly related to this. Right. > Also, what about code like this: > > try: > doSomething() > except SomeError: > pass > > doSomethingElse() > > Should exceptions raised by doSomethingElse()' be treated as having the > SomeError as their context, if it was raised? > > If I understand correctly, the interpreter cannot currently distinguish > between this, and the case where an error is raised inside the 'except' > clause. Indeed the interpreter currently doesn't distinguish between these, but I think it ought to for the purposes of this proposal. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com