On 1/4/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 01:41 AM 1/4/2007 -0600, Ka-Ping Yee wrote: > >How about this? > > > > except ExcType, e: > > try: > > # body > > finally: > > e = None > > It's a little bit more difficult to explain in the reference manual. I was > figuring we'd say that the exception variable is bound only in the body of > the except clause; saying it becomes None when you exit sounds weirder to > me. How about: > > except ExcType, e: > try: > # body > finally: > e = None > del e > > Then we get the best of all three worlds: a clean explanation, a clean > implementation, and a pure source-to-source transformation.
Great! We need (a) an update to PEP 3100 and (b) a patch to implement this. (Once we have this we can talk about the rest of PEP 344; perhaps that PEP should also target Py3k only?) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com