Message6469
Logged In: YES
user_id=89016
Thanks for the quick fix, but the second problem still
remains:
---
class U(unicode):
pass
u = U(u"foo")
print type(u[0:3])
print type(u[0:2])
---
This gives:
---
<type '__main__.U'>
<type 'unicode'>
---
I think this should be changed to either always return a
unicode object, or to always return an instance of the real
class passed in. (This should be done for all unicode
methods that return a new unicode object). The second
solution would simplify creating derived classes, because
all the methods that return unicode objects would
automatically return the derived type, so these methods
don't have to be overwritten.
|
|
Date |
User |
Action |
Args |
2007-08-23 13:56:19 | admin | link | issue460020 messages |
2007-08-23 13:56:19 | admin | create | |
|