From: Victor Stinner Date: Mon, 22 Mar 2010 12:36:28 +0000 (+0000) Subject: Fix the NEWS about my last commit: an unicode subclass can now override the X-Git-Tag: v2.7b1~259 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7790ed1637ad688ea61decf45703f996f29584d;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 973a00870fec..368788f8f5e0 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -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') diff --git a/Misc/NEWS b/Misc/NEWS index 12db4af60fb3..385e341939ff 100644 --- 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.