]> granicus.if.org Git - python/commitdiff
Fix the NEWS about my last commit: an unicode subclass can now override the
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 22 Mar 2010 12:36:28 +0000 (12:36 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 22 Mar 2010 12:36:28 +0000 (12:36 +0000)
__unicode__ method (and not the __str__ method).

Simplify also the testcase.

Lib/test/test_unicode.py
Misc/NEWS

index 973a00870fecc4749c9cd83d037d934f7b04f80b..368788f8f5e0fd0754571d23993f74339e665f8d 100644 (file)
@@ -1195,8 +1195,6 @@ class UnicodeTest(
 
     def test_format_subclass(self):
         class U(unicode):
-            def __str__(self):
-                return '__str__ overridden'
             def __unicode__(self):
                 return u'__unicode__ overridden'
         u = U(u'xxx')
index 12db4af60fb3b57acd7c344159ca48dcaefd4ce0..385e341939ff093de59a364bad18b2a564ca1028 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,7 +12,7 @@ What's New in Python 2.7 beta 1?
 Core and Builtins
 -----------------
 
-- Issue #1583863: An unicode subclass can now override the __str__ method
+- Issue #1583863: An unicode subclass can now override the __unicode__ method
 
 - Issue #6474: Make error message from passing an inadequate number of keyword
   arguments to a function correct.