Issue 1776696: tempfile.TemporaryFile differs between platforms (original) (raw)
Issue1776696
Created on 2007-08-18 02:31 by loafman, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg32654 - (view) | Author: Kenneth Loafman (loafman) | Date: 2007-08-18 02:31 |
When running the following: import tempfile foo=tempfile.TemporaryFile type(foo) Linux returns: <type 'file'> Windows and Cygwin return: <type 'instance'> It should return the same across platforms, or return an undefined indication if not possible. | ||
msg32655 - (view) | Author: Christian Heimes (christian.heimes) * ![]() |
Date: 2007-08-19 12:54 |
It's not a bug. The interface for both types are equal. Python doesn't guarantee that it uses the same types on every platform. It just guarantees that the behavior of the objects are the same on both platforms. Please study tempfile.py for detailed information. | ||
msg55162 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2007-08-23 17:17 |
I agree with tiran. TemporaryFile(...) returns a file-like object, the details are implementation specific. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:26 | admin | set | github: 45323 |
2007-08-23 17:17:56 | georg.brandl | set | status: open -> closedresolution: not a bugmessages: + nosy: + georg.brandl |
2007-08-18 02:31:16 | loafman | create |