[Python-checkins] python/dist/src/Lib tempfile.py,1.48,1.49
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Wed, 14 Aug 2002 08:41:28 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv25409/python/lib
Modified Files:
tempfile.py
Log Message:
tempfile's mkstemp(): Changed last argument from
binary=True
to
text=False
by BDFL Pronouncement. All other changes follow from this. The change
to the docs is ready to go, but blocked by another JackMacLock in the
doc directory.
Index: tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tempfile.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** tempfile.py 14 Aug 2002 15:10:09 -0000 1.48
--- tempfile.py 14 Aug 2002 15:41:26 -0000 1.49
***************
*** 251,256 ****
return tempdir
! def mkstemp(suffix="", prefix=template, dir=gettempdir(), binary=True):
! """mkstemp([suffix, [prefix, [dir, [binary]]]])
User-callable function to create and return a unique temporary
file. The return value is a pair (fd, name) where fd is the
--- 251,256 ----
return tempdir
! def mkstemp(suffix="", prefix=template, dir=gettempdir(), text=False):
! """mkstemp([suffix, [prefix, [dir, [text]]]])
User-callable function to create and return a unique temporary
file. The return value is a pair (fd, name) where fd is the
***************
*** 266,272 ****
otherwise a default directory is used.
! If 'binary' is specified and false, the file is opened in text
! mode. Otherwise, the file is opened in binary mode. On some
! operating systems, this makes no difference.
The file is readable and writable only by the creating user ID.
--- 266,272 ----
otherwise a default directory is used.
! If 'text' is specified and true, the file is opened in text
! mode. Else (the default) the file is opened in binary mode. On
! some operating systems, this makes no difference.
The file is readable and writable only by the creating user ID.
***************
*** 278,285 ****
"""
! if binary:
! flags = _bin_openflags
! else:
flags = _text_openflags
return _mkstemp_inner(dir, prefix, suffix, flags)
--- 278,285 ----
"""
! if text:
flags = _text_openflags
+ else:
+ flags = _bin_openflags
return _mkstemp_inner(dir, prefix, suffix, flags)
***************
*** 291,295 ****
directory. The return value is the pathname of the directory.
! Arguments are as for mkstemp, except that the 'binary' argument is
not accepted.
--- 291,295 ----
directory. The return value is the pathname of the directory.
! Arguments are as for mkstemp, except that the 'text' argument is
not accepted.
***************
*** 320,324 ****
file is not created.
! Arguments are as for mkstemp, except that the 'binary' argument is
not accepted.
--- 320,324 ----
file is not created.
! Arguments are as for mkstemp, except that the 'text' argument is
not accepted.