"Guido van Rossum" <[EMAIL PROTECTED]> wrote: > > On 1/9/07, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > I know that one of the points of all of this is so that the name that > > the exc_info() stuff gets in the local scope doesn't propagate past the > > except clause, but I can't help feeling as if removing the name isn't a > > little overenthusiastic. > > What's your use case, except for not breaking existing code? Apart > from the latter, I can't think of a single use case that isn't served > just as well by *copying* the object reference into another variable. > > BTW perhaps we should add the same semantics and syntax to 'with expr > as var'? I can't think of a reasonable use case for keeping var alive > after the with-statement terminates either. (Nor for using anything > more complex than a local variable, BTW.)
I suppose when compared with the 'with' syntax, which is also supposed to handle error conditions and cleanup, I am convinced that propagating the name post-context/exception management should be avoided. Consider the alternate semantics withdrawn (if it wasn't considered rejected ;) ). - Josiah _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
