This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bug in python's tempfile : returning wrong object type
- From: Chris Herborth <cherborth at qnx dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 09 Feb 2005 15:33:37 -0500
- Subject: Re: Bug in python's tempfile : returning wrong object type
- Organization: QNX Software Systems Ltd.
- References: <Pine.LNX.4.44.0502091740270.2277-100000@localhost.localdomain>
- Reply-to: cherborth at qnx dot com
Nick Burch wrote:
With cygwin distributed python (2.4, dec 4 2004), there's a bug in
tempfile.
import tempfile
fo = tempfile.TemporaryFile()
type(fo)
This should return <type 'file'>, but is currently returning
<type 'instance'>
This also seems broken on python 2.3.4
This isn't a Cygwin problem or feature. The Windows-native Python 2.4
(Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on
win32) gives the same result.
I suspect the tempfile module's docs are misleading... it you look at
the code, the returned object is an instance of
tempfile._TemporaryFileWrapper.
--
Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/