[New-bugs-announce] [issue2021] Turn NamedTemporaryFile into a context manager

Alexander Belopolsky report at bugs.python.org
Wed Feb 6 17:14:24 CET 2008

New submission from Alexander Belopolsky:

In the spirit of files becoming context managers in 2.5, the attached
patch defines __enter__ and __exit__ methods for

BTW, I was not able to add a "patch" keyword which seems appropriate here.

components: Library (Lib)
files: with_NamedTemporaryFile.diff
messages: 62102
nosy: belopolsky
severity: normal
status: open
title: Turn NamedTemporaryFile into a context manager
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file9360/with_NamedTemporaryFile.diff

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list