Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Chris Herborth Subject: Re: Bug in python's tempfile : returning wrong object type Date: Wed, 09 Feb 2005 15:33:37 -0500 Organization: QNX Software Systems Ltd. Lines: 24 Message-ID: References: Reply-To: cherborth AT qnx DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: entropy.qnx.com User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) In-Reply-To: X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-MailScanner-From: goc-cygwin AT m DOT gmane DOT org X-MailScanner-To: cygwin AT cygwin DOT com X-IsSubscribed: yes 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 , but is currently returning > > > 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 AT qnx DOT 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/