Skip to content

Commit ae3dd04

Browse files
author
Victor Stinner
committed
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.
1 parent f721419 commit ae3dd04

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

Lib/test/test_unicode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,6 @@ def test_raiseMemError(self):
11951195

11961196
def test_format_subclass(self):
11971197
class U(unicode):
1198-
def __str__(self):
1199-
return '__str__ overridden'
12001198
def __unicode__(self):
12011199
return u'__unicode__ overridden'
12021200
u = U(u'xxx')

Misc/NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ What's New in Python 2.7 beta 1?
1212
Core and Builtins
1313
-----------------
1414

15-
- Issue #1583863: An unicode subclass can now override the __str__ method
15+
- Issue #1583863: An unicode subclass can now override the __unicode__ method
1616

1717
- Issue #6474: Make error message from passing an inadequate number of keyword
1818
arguments to a function correct.

0 commit comments

Comments
 (0)