This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients kristjan.jonsson
Date 2009-01-13.09:21:34
SpamBayes Score 0.0016503707
Marked as misclassified No
Message-id <1231838497.34.0.90195679535.issue4927@psf.upfronthosting.co.za>
In-reply-to
Content
The repr for fileobjects is inconsistent.  On windows:
f = file("tmp\\foo", "wb")
f
<open file 'tmp\foo', mode 'wb' at ...>
f = file(u"tmp\\foo", "wb")
f
<open file u'tmp\\foo', mode 'wb' at ...>

For unicode, the filename is a proper "repr", but for a string it is 
just the plain string, enclosed in single quotes.  Note that I consider 
the string case in error.  Like the repr of a list or tuple, it should 
be a string containin the repr of its components.

This leads to problems in the testsuite on vista.

I propose to change this with the patch provided, which always displays 
the repr of the filename.  It may have side effects in the testsuite, I 
will add a separate file for that.
History
Date User Action Args
2009-01-13 09:21:37kristjan.jonssonsetrecipients: + kristjan.jonsson
2009-01-13 09:21:37kristjan.jonssonsetmessageid: <1231838497.34.0.90195679535.issue4927@psf.upfronthosting.co.za>
2009-01-13 09:21:36kristjan.jonssonlinkissue4927 messages
2009-01-13 09:21:35kristjan.jonssoncreate