Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libfuncs.tex @ 10514:96beaead874f legacy-trunk
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.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 05 Apr 1999 21:22:41 +0000 |
| parents | 9cd4fd926df6 |
| children | 5581307db2f7 |
line wrap: on
line diff
--- a/Doc/lib/libfuncs.tex Mon Apr 05 21:18:12 1999 +0000 +++ b/Doc/lib/libfuncs.tex Mon Apr 05 21:22:41 1999 +0000 @@ -434,18 +434,23 @@ 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 @@ 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}}
