From 2ccf5d689bc1b893fc89ba3f5131a5f504dff1cd Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Wed, 30 Jun 2004 21:06:45 +0000 Subject: use file() in preference to open() --- Doc/lib/libfcntl.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/lib/libfcntl.tex b/Doc/lib/libfcntl.tex index 21daa41..f7d4438 100644 --- a/Doc/lib/libfcntl.tex +++ b/Doc/lib/libfcntl.tex @@ -153,11 +153,11 @@ Examples (all on a SVR4 compliant system): \begin{verbatim} import struct, fcntl -file = open(...) -rv = fcntl(file, fcntl.F_SETFL, os.O_NDELAY) +f = file(...) +rv = fcntl(f, fcntl.F_SETFL, os.O_NDELAY) lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0) -rv = fcntl.fcntl(file, fcntl.F_SETLKW, lockdata) +rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata) \end{verbatim} Note that in the first example the return value variable \var{rv} will -- cgit v0.12