In the docs of the open()
built-in function, the meaning of "+" is as follows:
open a disk file for updating (reading and writing)
But when I use open()
to create a new file with python 3.5 in windows 7, I got a FileNotFoundError
.
tmp_file=open(str(temp_path),'r+')
From the explanation of open()
in the docs, wouldn't it create a new empty file if the file specified doesn't exist when using the r+
mode?