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
tempfile.NamedTemporaryFile.

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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2021>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to