[Python-checkins] python/dist/src/Doc/lib libfuncs.tex, 1.175.2.1, 1.175.2.2

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Fri Jan 7 05:35:11 CET 2005


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24014

Modified Files:
      Tag: release24-maint
	libfuncs.tex 
Log Message:
SF patch 1094011:  Docs for file() vs open().

Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.175.2.1
retrieving revision 1.175.2.2
diff -u -d -r1.175.2.1 -r1.175.2.2
--- libfuncs.tex	1 Jan 2005 00:34:53 -0000	1.175.2.1
+++ libfuncs.tex	7 Jan 2005 04:35:08 -0000	1.175.2.2
@@ -416,9 +416,12 @@
     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.  The previous
-  spelling, \function{open()}, is retained for compatibility, and is an
-  alias for \function{file()}.
+  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)}).
 \end{funcdesc}
 
 \begin{funcdesc}{filter}{function, list}



More information about the Python-checkins mailing list