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.
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: