On 9/2/06, Brett Cannon <[EMAIL PROTECTED]> wrote:
> Right, which is why the original suggestion came up in the first place.  It
> would be nice to compartmentalize exceptions entirely, but the worry of
> keeping a ont of memory alive for it needs to be addressed, especially if
> exceptions are to be kept lightweight and usable for things other than
> flagging errors.
>
> -Brett

So, at issue is attaching tracebacks to exceptions keeps too much
alive and thus makes exceptions too heavy? If the traceback was passed
to the exception constructor and then held as an attribute of the
exception, any exception meant for "light" work (ie., not normal error
flagging) could simply decided not to include the traceback, and so it
would be destroyed, removing the weight from the exception. Similarly,
tracebacks could have some lean() method to drop references to the
frames.
_______________________________________________
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

Reply via email to