diff Objects/unicodeobject.c @ 59900:6151d09ce039 2.6

Merged revisions 79278,79280 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79278 | victor.stinner | 2010-03-22 13:24:37 +0100 (lun., 22 mars 2010) | 2 lines Issue #1583863: An unicode subclass can now override the __str__ method ........ r79280 | victor.stinner | 2010-03-22 13:36:28 +0100 (lun., 22 mars 2010) | 5 lines Fix the NEWS about my last commit: an unicode subclass can now override the __unicode__ method (and not the __str__ method). Simplify also the testcase. ........
author Victor Stinner <victor.stinner@haypocalc.com>
date Mon, 22 Mar 2010 12:56:39 +0000
parents aacc0d48d44d
children 22c045d1bc8c
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Sun Mar 21 21:52:46 2010 +0000
+++ b/Objects/unicodeobject.c	Mon Mar 22 12:56:39 2010 +0000
@@ -8653,7 +8653,7 @@
 
             case 's':
             case 'r':
-                if (PyUnicode_Check(v) && c == 's') {
+                if (PyUnicode_CheckExact(v) && c == 's') {
                     temp = v;
                     Py_INCREF(temp);
                 }