This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients nikratio, rhettinger
Date 2011-12-12.03:17:41
SpamBayes Score 2.85976e-05
Marked as misclassified No
Message-id <>
Example code:

with CleanupManager() als mngr:
    tmpdir = tempfile.mkdtemp()
    mngr.register(shutil.rmtree(tmpdir)) <-- this makes the call right away
    # do stuff with tmpdir

The part of my note that should be clear is that the idea and code need to prove itself before being added to the standard library.  So far, there has been zero demand for this and I've not seen code like it being used in the wild.  AFAICT, it is not demonstrably better than a straight-forward try/finally.
Date User Action Args
2011-12-12 03:17:42rhettingersetrecipients: + rhettinger, nikratio
2011-12-12 03:17:42rhettingersetmessageid: <>
2011-12-12 03:17:41rhettingerlinkissue13585 messages
2011-12-12 03:17:41rhettingercreate