mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
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.
This commit is contained in:
parent
3017a7bbbf
commit
c7790ed163
2 changed files with 1 additions and 3 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue