diff options
author | Fred Drake <fdrake@acm.org> | 1999-04-05 21:22:41 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-04-05 21:22:41 (GMT) |
commit | 9aa8543c842d08f24ccc5a707fd557d8c4c84cc4 (patch) | |
tree | abd2bc6a70e5c10c12b5f0b93444a6f3dcd0760e /Doc/lib/libfuncs.tex | |
parent | ae14230069704a08b3187fe71672b0e01bbd78ea (diff) | |
download | cpython-9aa8543c842d08f24ccc5a707fd557d8c4c84cc4.zip cpython-9aa8543c842d08f24ccc5a707fd557d8c4c84cc4.tar.gz cpython-9aa8543c842d08f24ccc5a707fd557d8c4c84cc4.tar.bz2 |
open() description: Made it more clear that 'b' should always be
added to the mode value for binary files to improve
portability.
Fixed latex2html weirdness with a couple of footnotes.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r-- | Doc/lib/libfuncs.tex | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index f195740..df384af 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -434,18 +434,23 @@ one argument, return the smallest of the arguments. ignored). If the file cannot be opened, \exception{IOError} is raised. -If \var{mode} is omitted, it defaults to \code{'r'}. -The optional \var{bufsize} argument specifies the file's desired -buffer size: 0 means unbuffered, 1 means line buffered, any other -positive value means use a buffer of (approximately) that size. A -negative \var{bufsize} means to use the system default, which is -usually line buffered for for tty devices and fully buffered for other -files. If omitted, the system default is used.% -\footnote{Specifying a buffer size currently has no effect on systems -that don't have \cfunction{setvbuf()}. The interface to specify the buffer -size is not done using a method that calls \cfunction{setvbuf()}, because -that may dump core when called after any I/O has been performed, and -there's no reliable way to determine whether this is the case.} + If \var{mode} is omitted, it defaults to \code{'r'}. When opening a + binary file, you should append \code{'b'} to the \var{mode} value + for improved portability. (It's useful even on systems which don't + treat binary and text files differently, where it serves as + documentation.) The optional \var{bufsize} argument specifies the + file's desired buffer size: 0 means unbuffered, 1 means line + buffered, any other positive value means use a buffer of + (approximately) that size. A negative \var{bufsize} means to use + the system default, which is usually line buffered for for tty + devices and fully buffered for other files. If omitted, the system + default is used.\footnote{ + Specifying a buffer size currently has no effect on systems that + don't have \cfunction{setvbuf()}. The interface to specify the + buffer size is not done using a method that calls + \cfunction{setvbuf()}, because that may dump core when called + after any I/O has been performed, and there's no reliable way to + determine whether this is the case.} \end{funcdesc} \begin{funcdesc}{ord}{c} @@ -649,10 +654,10 @@ local symbol table. With a module, class or class instance object as argument (or anything else that has a \member{__dict__} attribute), returns a dictionary corresponding to the object's symbol table. The returned dictionary should not be modified: the effects on the -corresponding symbol table are undefined.% -\footnote{In the current implementation, local variable bindings -cannot normally be affected this way, but variables retrieved from -other scopes (e.g. modules) can be. This may change.} +corresponding symbol table are undefined.\footnote{ + In the current implementation, local variable bindings cannot + normally be affected this way, but variables retrieved from + other scopes (e.g. modules) can be. This may change.} \end{funcdesc} \begin{funcdesc}{xrange}{\optional{start,} stop\optional{, step}} |