On Dec 31, 8:08 am, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Gabriel Genellina writes: > > On 30 dic, 17:25, Torsten Bronger <[EMAIL PROTECTED]> > > wrote: > > >> I sub-classed unicode in an own class called "Excerpt", and now I > >> try to implement a __unicode__ method. In this method, I want to > >> get the actual value of the instance, i.e. the unicode string: > > > The "actual value of the instance", given that it inherits from > > unicode, is... self. > > But then it is not unicode but Excerpt which I don't want. The idea > is to buffer the unicode representation in order to gain efficiency. > Otherwise, a lot of unicode conversion would take place. >
I'm confused: you are subclassing unicode, and want to use several unicode methods, but the object's value appears to be an 8-bit string!?!? Care to divulge the code for your __init__ method? -- http://mail.python.org/mailman/listinfo/python-list