diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-05-02 04:43:14 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-05-02 04:43:14 (GMT) |
commit | c4edb0ec81f437b84a4011e3a375892d48d0bd6c (patch) | |
tree | df542d1d9c5d89d5555d7cda6026628f2139f05f /Doc | |
parent | 4bbf66e852e2e812b4ef0fa774ff8614c96a0b82 (diff) | |
download | cpython-c4edb0ec81f437b84a4011e3a375892d48d0bd6c.zip cpython-c4edb0ec81f437b84a4011e3a375892d48d0bd6c.tar.gz cpython-c4edb0ec81f437b84a4011e3a375892d48d0bd6c.tar.bz2 |
SF #1479181: split open() and file() from being aliases for each other.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libfuncs.tex | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 686db39..ff81faa 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -455,12 +455,7 @@ class C: after any I/O has been performed, and there's no reliable way to determine whether this is the case.} - The \function{file()} constructor is new in Python 2.2 and is an - alias for \function{open()}. Both spellings are equivalent. The - intent is for \function{open()} to continue to be preferred for use - as a factory function which returns a new \class{file} object. The - spelling, \class{file} is more suited to type testing (for example, - writing \samp{isinstance(f, file)}). + \versionadded{2.2} \end{funcdesc} \begin{funcdesc}{filter}{function, list} @@ -725,7 +720,10 @@ class C: \end{funcdesc} \begin{funcdesc}{open}{filename\optional{, mode\optional{, bufsize}}} - An alias for the \function{file()} function above. + A wrapper for the \function{file()} function above. The intent is + for \function{open()} to be preferred for use as a factory function + returning a new \class{file} object. \class{file} is more suited to + type testing (for example, writing \samp{isinstance(f, file)}). \end{funcdesc} \begin{funcdesc}{ord}{c} |