[ python-Bugs-1459029 ] Doubled backslash in repr() method for unicode

SourceForge.net noreply at sourceforge.net
Mon Mar 27 07:53:22 CEST 2006


Bugs item #1459029, was opened at 2006-03-27 13:54
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1459029&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unicode
Group: Python 2.4
Status: Open
Resolution: None
Priority: 7
Submitted By: Christoph Zwerschke (cito)
>Assigned to: Hye-Shik Chang (perky)
Summary: Doubled backslash in repr() method for unicode

Initial Comment:
Here is an issue that caused Kid templates (used by
Turbogears) to malfunction in Python 2.4.3c1.

The problem shows up with the following code:

class s1:
    def __repr__(self):
        return '\\n'

class s2:
    def __repr__(self):
        return u'\\n'

print repr(s1()), repr(s2())

I get the following results:

Python 2.3.5: \n \n
Python 2.4.2: \n \n
Python 2.4.3c1: \n \\n 

In the output for Python 2.4.3c1, the backslash in the
representation of class2 appears doubled. This did not
happen in earlier Python versions and seems to be a bug.

My vague guess is that the issue may have crept in with
an attempted fix of Bug #1379994.

-- Christoph

----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2006-03-27 16:53

Message:
Logged In: YES 
user_id=29957

Confirmed - it's also broken in the trunk, and backing out
the patch for http://www.python.org/sf/1379994 (r41728)
fixes the problem. Perky, you checked this in - can you look
at this soon, please? I don't want to release 2.4.3 until
it's fixed, but I also want to get 2.4.3 out this week.

Thanks for the bug report!


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1459029&group_id=5470


More information about the Python-bugs-list mailing list