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/libwave.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/libwave.tex')
-rw-r--r-- | Doc/lib/libwave.tex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/lib/libwave.tex b/Doc/lib/libwave.tex index 44af40e..cac09d3 100644 --- a/Doc/lib/libwave.tex +++ b/Doc/lib/libwave.tex @@ -12,7 +12,7 @@ mono/stereo. The \module{wave} module defines the following function and exception: -\begin{funcdesc}{open}{file, mode} +\begin{funcdesc}{open}{file\optional{, mode}} If \var{file} is a string, open the file by that name, other treat it as a seekable file-like object. \var{mode} can be any of \begin{description} @@ -23,7 +23,10 @@ Note that it does not allow read/write WAV files. A \var{mode} of \code{'r'} or \code{'rb'} returns a \class{Wave_read} object, while a \var{mode} of \code{'w'} or \code{'wb'} returns -a \class{Wave_write} object. +a \class{Wave_write} object. If \var{mode} is omitted and a file-like +object is passed as \var{file}, \code{\var{file}.mode} is used as the +default value for \var{mode} (the \character{b} flag is still added if +necessary). \end{funcdesc} \begin{funcdesc}{openfp}{file, mode} |