diff Objects/unicodeobject.c @ 59895:52cf7e65dad1 legacy-trunk

Issue #1583863: An unicode subclass can now override the __str__ method
author Victor Stinner <victor.stinner@haypocalc.com>
date Mon, 22 Mar 2010 12:24:37 +0000
parents 6c14c27925b9
children d11fbc796499
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Mon Mar 22 02:49:08 2010 +0000
+++ b/Objects/unicodeobject.c	Mon Mar 22 12:24:37 2010 +0000
@@ -8466,7 +8466,7 @@
 
             case 's':
             case 'r':
-                if (PyUnicode_Check(v) && c == 's') {
+                if (PyUnicode_CheckExact(v) && c == 's') {
                     temp = v;
                     Py_INCREF(temp);
                 }