
Whether a line of Python opens a file for writing
Source:R/reproducibility_check.R
dot-py_open_writes.RdOnly the mode argument of an open() call counts: the second positional
argument, or mode =. A mode is a write when it is w, a, x or r+,
with b, t or +. Any quoted word with a w, a or x in it used to count,
so open(p, encoding = "ascii") was a write and open(p, "r+") was not
(U240).
Value
TRUE when an open() call on the line has a write mode