diff options
author | Fred Drake <fdrake@acm.org> | 1999-12-21 18:31:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-12-21 18:31:30 (GMT) |
commit | 89ab16347905fbf389a3bced117f605742ce52cc (patch) | |
tree | 710580900373c3982360f803bb67b41c960cfb6c /Doc/lib/libaifc.tex | |
parent | 96b5ee88ee8b2122c549bda1f73330428a189ff0 (diff) | |
download | cpython-89ab16347905fbf389a3bced117f605742ce52cc.zip cpython-89ab16347905fbf389a3bced117f605742ce52cc.tar.gz cpython-89ab16347905fbf389a3bced117f605742ce52cc.tar.bz2 |
Document that the |mode| parameter to open() is optional and explain how
the default value is determined.
Diffstat (limited to 'Doc/lib/libaifc.tex')
-rw-r--r-- | Doc/lib/libaifc.tex | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/lib/libaifc.tex b/Doc/lib/libaifc.tex index e2e3607..9ba46ed 100644 --- a/Doc/lib/libaifc.tex +++ b/Doc/lib/libaifc.tex @@ -33,15 +33,16 @@ second's worth occupies 2*2*44100 bytes, i.e.\ 176,400 bytes. Module \module{aifc} defines the following function: -\begin{funcdesc}{open}{file, mode} +\begin{funcdesc}{open}{file\optional{, mode}} Open an AIFF or AIFF-C file and return an object instance with -methods that are described below. The argument file is either a -string naming a file or a file object. The mode is either the string -\code{'r'} when the file must be opened for reading, or \code{'w'} -when the file must be opened for writing. When used for writing, the -file object should be seekable, unless you know ahead of time how many -samples you are going to write in total and use -\method{writeframesraw()} and \method{setnframes()}. +methods that are described below. The argument \var{file} is either a +string naming a file or a file object. \var{mode} must be \code{'r'} +or \code{'rb'} when the file must be opened for reading, or \code{'w'} +or \code{'wb'} when the file must be opened for writing. If omitted, +\code{\var{file}.mode} is used if it exists, otherwise \code{'rb'} is +used. When used for writing, the file object should be seekable, +unless you know ahead of time how many samples you are going to write +in total and use \method{writeframesraw()} and \method{setnframes()}. \end{funcdesc} Objects returned by \function{open()} when a file is opened for |