]> granicus.if.org Git - python/commitdiff
NamedTemporaryFile(), TemporaryFile(): removed needless local vrbl 'bin'.
authorTim Peters <tim.peters@gmail.com>
Tue, 13 Aug 2002 23:36:01 +0000 (23:36 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 13 Aug 2002 23:36:01 +0000 (23:36 +0000)
Lib/tempfile.py

index f9d8dbc74488d8f3650716ed8bd5fd61c6c2c0c9..8ed459954488b7862c07d64b46ea3716a1cebff6 100644 (file)
@@ -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: