On 9/3/06, Brett Cannon <[EMAIL PROTECTED]> wrote: > On 9/3/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> > The traceback gets created anyway, so how > > is it going to use more memory if it's attached to a > > throwaway exception instead of kept in a sys variable? > > ... how often are exceptions kept for long > > periods after being caught? > It was a sticking point when the idea was first put forth. I think people were really objecting to cyclic garbage in general. Both the garbage collector and weak references have improved since the original discussion. Even today, if a StopIteration() participates in a reference cycle, then it won't be reclaimed until the next gc run. I'm not quite sure which direction should be a weakref, but I think it would be reasonable for the cycle to get broken when an catching except block exits without reraising. -jJ _______________________________________________ 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
