[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

Meador Inge report at bugs.python.org
Fri Aug 30 01:56:42 CEST 2013


Meador Inge added the comment:

Confirmed in trunk:

>>> tempfile.NamedTemporaryFile(dir=".",delete=False).write(b"hello")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: write to closed file

----------
nosy: +meador.inge

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18879>
_______________________________________


More information about the Python-bugs-list mailing list