>>> How does my object get its own value?
>> def __unicode__(self):
>> return unicode(self)
>
> I get an endless recursion with this.
I see. That worked fine in Python 2.4, but give a stack overflow
in Python 2.5.
Depending on your exact class definition, something like
return supe
Hallöchen!
John Machin writes:
> On Dec 31, 8:08 am, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>
>> [...]
>>
>> 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 conversio
Hallöchen!
Martin v. Löwis writes:
>> How does my object get its own value?
>
> def __unicode__(self):
> return unicode(self)
I get an endless recursion with this.
I must admit, though, that I probably overestimate the costs
connected with unicode(my_excerpt) because Gabriel is probably r
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 thi
> How does my object get its own value?
def __unicode__(self):
return unicode(self)
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Hallöchen!
Gabriel Genellina writes:
> On 30 dic, 19:08, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>
>> [...]
>>
>> 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 conve
On 30 dic, 19:08, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> 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
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 unico
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",