"Greg Falcon" <[EMAIL PROTECTED]> wrote:
[snip]
> Per these rules:
> On 1/7/07, Collin Winter <[EMAIL PROTECTED]> wrote:
> > > On 1/4/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> > > >       except ExcType, e:
> > > >           try:
> > > >               # body
> > > >           finally:
> > > >               e = None
> > > >               del e
> > The transformation is as Phillip outlined above, with extra logic to
> > handle the case where e is a tuple or list.
> 
> Perhaps the example transformation you provided is better, in that at
> least you can't make the mistake I'm worried about.  But it seems a
> bit gratuitous (and expensive) to delete N variables when there are N
> except clauses.

You are right.  Hrm...  I see the reasoning behind putting the finally
clause inside the except suite, but I can't help feeling that it would
be better outside.  Yeah you delete the name every time, but I think
consistancy would be better in this case (also, deleting a local is
really fast, I wouldn't worry about time considerations).

 - 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

Reply via email to