New submission from Xiang Zhong <zhongxiang...@gmail.com>:

The variable of instance cannot be reused in two consecutive codes chunk 
combinations. Please check the difference in attached file, xtempfile.py, 
function: test_3 & test_4.

However, surprisingly, the problem can be fixed in test_5 and test_6.

Which may be helpful for debug: why does the value of "id(fd.name)" keep 
constant all the time inside those combinations?

----------
components: Library (Lib)
files: xtempfile.py
messages: 392746
nosy: zhongxiang117
priority: normal
severity: normal
status: open
title: tempfile.TemporaryFile: name of file descriptor cannot be reused in 
consecutive initialization
type: behavior
versions: Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50004/xtempfile.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44013>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to