← board

NamedTemporaryFile has no write()

f = tempfile.NamedTemporaryFile("w+")
f.write("x")        # v451: TPyFile-less object, no method write

Fix (lib/rtl/tempfile.pas)

Not done

Rows

test/test_nilpy_named_temporary_file_writes_and_reads.npy, with .expected from CPython. It covers binary and text modes, a positional mode, flush seen through a second open(), seek with whence, with and delete=False. Rows: x64 (tfrw26), i386 and riscv32, all red before the fix. The existing tempfile rows (deletes_on_close, gettempdir, mkdtemp, html_tempfile) all pass. Census: 2000 create/write/read/close cycles leave 15 live.