diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-08-13 23:36:01 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-08-13 23:36:01 (GMT) |
commit | c21ea749710c677d8e0ca7c2f49aaae7b7316a9f (patch) | |
tree | fbbc200b26dd12c9216c6d4a93aa5aedeba46381 | |
parent | bd7b4c7e46ca325da91ffccc247bdedb4ba2085a (diff) | |
download | cpython-c21ea749710c677d8e0ca7c2f49aaae7b7316a9f.zip cpython-c21ea749710c677d8e0ca7c2f49aaae7b7316a9f.tar.gz cpython-c21ea749710c677d8e0ca7c2f49aaae7b7316a9f.tar.bz2 |
NamedTemporaryFile(), TemporaryFile(): removed needless local vrbl 'bin'.
-rw-r--r-- | Lib/tempfile.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py index f9d8dbc..8ed4599 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -396,9 +396,10 @@ def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="", closed. """ - bin = 'b' in mode - if bin: flags = _bin_openflags - else: flags = _text_openflags + if 'b' in mode: + flags = _bin_openflags + else: + flags = _text_openflags # Setting O_TEMPORARY in the flags causes the OS to delete # the file when it is closed. This is only supported by Windows. @@ -428,9 +429,10 @@ else: exist when it is closed. """ - bin = 'b' in mode - if bin: flags = _bin_openflags - else: flags = _text_openflags + if 'b' in mode: + flags = _bin_openflags + else: + flags = _text_openflags (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags) try: |