Author georg.brandl
Recipients georg.brandl, kevincox
Date 2014-03-25.22:54:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1395788087.44.0.580470174787.issue21067@psf.upfronthosting.co.za>
In-reply-to
Content
For resource management, it would be more idiomatic to use context managers, either with multiple CMs in one with-statement or, dynamically, with contextlib.ExitStack.

For test suites using unittest, there is also the addCleanup functionality of the TestCase.  (And if another test framework is used, it might have something similar, or maybe should grow it.)

Anyway, such changes are not decided upon in the tracker. If you think this should go forward please discuss it on the python-ideas list. For it to go forward a PEP will likely need to be written.
History
Date User Action Args
2014-03-25 22:54:47georg.brandlsetrecipients: + georg.brandl, kevincox
2014-03-25 22:54:47georg.brandlsetmessageid: <1395788087.44.0.580470174787.issue21067@psf.upfronthosting.co.za>
2014-03-25 22:54:47georg.brandllinkissue21067 messages
2014-03-25 22:54:47georg.brandlcreate