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 loewis
Recipients kristjan.jonsson, loewis
Date 2009-01-15.23:03:20
SpamBayes Score 0.038554
Marked as misclassified No
Message-id <>
In-reply-to <>
> I think the testsuite just exposed a design fault in python or a bug, if 
> you will.

I disagree. The feature is intentional as-is, and well-designed.

> It is customary when producing a 
> repr() of an object, to have it contain a repr() of the any inner 
> object, such as a string.

Not at all. It is customary to invoke the nested object's repr, in
the hope that the result of repr will be a string that you can pass
to eval(). This is completely different, because there is no hope
that the result of repr() of a file can be eval()ed.

As the repr is a string, it is natural to just concatenate the pieces
of the repr, including the file name string. For Unicode file names,
this natural approach fails, because one needs to encode the string
first. Mark chose to use an escape representation, because this gives
plain ASCII.

> Fixing the testsuite only, will just keep this discrepancy (or incorrect 
> string repr maybe) hidden for longer.

Right. Changing the repr will break existing code, for no good reason.
Date User Action Args
2009-01-15 23:03:21loewissetrecipients: + loewis, kristjan.jonsson
2009-01-15 23:03:21loewislinkissue4927 messages
2009-01-15 23:03:20loewiscreate