[Patches] [ python-Patches-1630248 ] Implement named exception cleanup

SourceForge.net noreply at sourceforge.net
Mon Jan 8 04:02:24 CET 2007


Patches item #1630248, was opened at 2007-01-07 22:02
Message generated for change (Comment added) made by collinwinter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1630248&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 3000
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Implement named exception cleanup

Initial Comment:
This patch implements the solution outlined in http://mail.python.org/pipermail/python-3000/2007-January/005395.html for avoiding exception-related refcount cycles.

Specifically,

try:
  ...
except ExcType, e:
  #body

is translated to

try:
  ...
except ExcType, e:
  try:
    # body
  finally:
    e = None
    del e


The attached patches are against r53289. exc_cleanup.patch is the implementation and testcases, while stdlib_fixes.patch repairs all places in the stdlib that depended on the old behaviour.

----------------------------------------------------------------------

>Comment By: Collin Winter (collinwinter)
Date: 2007-01-07 22:02

Message:
Logged In: YES 
user_id=1344176
Originator: YES

File Added: stdlib_fixes.patch

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1630248&group_id=5470


More information about the Patches mailing list