summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfcntl.tex
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-06-30 21:06:45 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-06-30 21:06:45 (GMT)
commit2ccf5d689bc1b893fc89ba3f5131a5f504dff1cd (patch)
tree85ab5fadca18be5e357ed80a9a0bf93f5314d17a /Doc/lib/libfcntl.tex
parent7db865af40ee413c8220e35fda39b381c41fd874 (diff)
downloadcpython-2ccf5d689bc1b893fc89ba3f5131a5f504dff1cd.zip
cpython-2ccf5d689bc1b893fc89ba3f5131a5f504dff1cd.tar.gz
cpython-2ccf5d689bc1b893fc89ba3f5131a5f504dff1cd.tar.bz2
use file() in preference to open()
Diffstat (limited to 'Doc/lib/libfcntl.tex')
-rw-r--r--Doc/lib/libfcntl.tex6
1 files 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