Subject: Re: Bug in python's tempfile : returning wrong object type
From: Chris Herborth <[email-masked]>
To: [email-masked]
Date: Wed, 09 Feb 2005 15:33:37 -0500

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 ([email-masked])
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/