Hallöchen! 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:
def __unicode__(self): """Returns the Unicode representation of Excerpt. Note that this is buffered, so don't be afraid of calling it many times. :Return: - Unicode representation of ``self`` :rtype: unicode """ if not hasattr(self, "__unicode"): self.__unicode = super(Excerpt, self).__unicode__() return self.__unicode Unfortunately, unicode objects don't have a __unicode__ method. However, unicode(super(Excerpt, self)) is also forbidden because super() allows attribute access only (why by the way?). How does my object get its own value? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for further contact info.) -- http://mail.python.org/mailman/listinfo/python-list