[Python-checkins] r79280 - in python/trunk: Lib/test/test_unicode.py Misc/NEWS
victor.stinner
python-checkins at python.org
Mon Mar 22 13:36:28 CET 2010
Author: victor.stinner
Date: Mon Mar 22 13:36:28 2010
New Revision: 79280
Log:
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.
Modified:
python/trunk/Lib/test/test_unicode.py
python/trunk/Misc/NEWS
Modified: python/trunk/Lib/test/test_unicode.py
==============================================================================
--- python/trunk/Lib/test/test_unicode.py (original)
+++ python/trunk/Lib/test/test_unicode.py Mon Mar 22 13:36:28 2010
@@ -1195,8 +1195,6 @@
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')
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Mon Mar 22 13:36:28 2010
@@ -12,7 +12,7 @@
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.
More information about the Python-checkins
mailing list