Message1871
 
            
            
            
 
   
   
 
 
  
      The string representation of unicode and subclass of unicode seems to be different. 
In CPython
----------
Python 2.5.1 (r251:54863, Jul 18 2007, 13:30:45)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class B(unicode):
...     pass
...
>>> a=unicode("12")
>>> b=B("12")
>>> a
u'12'
>>> b
u'12'
>>> repr(a)
"u'12'"
>>> repr(b)
"u'12'"
In Jython
----------
Jython 2.3a0 on java1.6.0_01
Type "copyright", "credits" or "license" for more information.
>>> class B(unicode):
...     pass
...
>>> a=unicode("12")
>>> b=B("12")
>>> a
u'12'
>>> b
u12
>>> repr(a)
u"u'12'"
>>> repr(b)
'u12'
 | 
   
  
 
|
 
| Date | 
User | 
Action | 
Args | 
 
| 2008-02-20 17:18:00 | admin | link | issue1782565 messages |  
| 2008-02-20 17:18:00 | admin | create |  |  
 
 
 |