diff options
author | Guido van Rossum <guido@python.org> | 1996-05-02 15:28:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-05-02 15:28:53 (GMT) |
commit | 316a430098b10a3483925eeeaa84c68d404d4416 (patch) | |
tree | 59dfee628d6007069cf6632a8e256d6639b178e6 /Doc | |
parent | 59b328e11ea53cc24146a1649c3727dfe24aa88b (diff) | |
download | cpython-316a430098b10a3483925eeeaa84c68d404d4416.zip cpython-316a430098b10a3483925eeeaa84c68d404d4416.tar.gz cpython-316a430098b10a3483925eeeaa84c68d404d4416.tar.bz2 |
Removed some spurios biindex calls.
Added description of file.truncate().
Added warning to write() about buffering.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libtypes.tex | 15 | ||||
-rw-r--r-- | Doc/libtypes.tex | 15 |
2 files changed, 22 insertions, 8 deletions
diff --git a/Doc/lib/libtypes.tex b/Doc/lib/libtypes.tex index 5c6bce8..052bc9f 100644 --- a/Doc/lib/libtypes.tex +++ b/Doc/lib/libtypes.tex @@ -639,9 +639,6 @@ built-in functions and methods, e.g.\ \code{posix.popen()} and \code{posix.fdopen()} and the \code{makefile()} method of socket objects. \bifuncindex{open} -\bifuncindex{popen} -\bifuncindex{fdopen} -\bifuncindex{makefile} When a file operation fails for an I/O-related reason, the exception \code{IOError} is raised. This includes situations where the @@ -712,8 +709,18 @@ Files have the following methods: Return the file's current position, like \code{stdio}'s \code{ftell()}. \end{funcdesc} +\begin{funcdesc}{truncate}{\optional{size}} +Truncate the file's size. If the optional size argument present, the +file is truncated to (at most) that size. The size defaults to the +current position. Availability of this function depends on the +operating system version (e.g., not all {\UNIX} versions support this +operation). +\end{funcdesc} + \begin{funcdesc}{write}{str} - Write a string to the file. There is no return value. +Write a string to the file. There is no return value. Note: due to +buffering, the string may not actually show up in the file until +the \code{flush()} or \code{close()} method is called. \end{funcdesc} \begin{funcdesc}{writelines}{list} diff --git a/Doc/libtypes.tex b/Doc/libtypes.tex index 5c6bce8..052bc9f 100644 --- a/Doc/libtypes.tex +++ b/Doc/libtypes.tex @@ -639,9 +639,6 @@ built-in functions and methods, e.g.\ \code{posix.popen()} and \code{posix.fdopen()} and the \code{makefile()} method of socket objects. \bifuncindex{open} -\bifuncindex{popen} -\bifuncindex{fdopen} -\bifuncindex{makefile} When a file operation fails for an I/O-related reason, the exception \code{IOError} is raised. This includes situations where the @@ -712,8 +709,18 @@ Files have the following methods: Return the file's current position, like \code{stdio}'s \code{ftell()}. \end{funcdesc} +\begin{funcdesc}{truncate}{\optional{size}} +Truncate the file's size. If the optional size argument present, the +file is truncated to (at most) that size. The size defaults to the +current position. Availability of this function depends on the +operating system version (e.g., not all {\UNIX} versions support this +operation). +\end{funcdesc} + \begin{funcdesc}{write}{str} - Write a string to the file. There is no return value. +Write a string to the file. There is no return value. Note: due to +buffering, the string may not actually show up in the file until +the \code{flush()} or \code{close()} method is called. \end{funcdesc} \begin{funcdesc}{writelines}{list} |