Message80416
| Author | Taldor |
|---|---|
| Recipients | Taldor |
| Date | 2009-01-23.15:02:40 |
| SpamBayes Score | 1.5609594e-05 |
| Marked as misclassified | No |
| Message-id | <1232723011.79.0.257405867279.issue5037@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Calling the unicode function on a proxy object, doesn't use the proxi-ed object's __unicode__ method, but its __str__ method. >>> class A(object): ... def __str__(self): ... return "str" ... def __unicode__(self): ... return "unicode" ... >>> a = A() >>> unicode(a) u'unicode' >>> import weakref >>> b = weakref.proxy(a) >>> unicode(b) u'str' I expected the last result to be u'unicode'. I did get u'unicode' in Python 2.5 (but not in 2.6). |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2009-01-23 15:03:31 | Taldor | set | recipients: + Taldor |
| 2009-01-23 15:03:31 | Taldor | set | messageid: <1232723011.79.0.257405867279.issue5037@psf.upfronthosting.co.za> |
| 2009-01-23 15:02:41 | Taldor | link | issue5037 messages |
| 2009-01-23 15:02:40 | Taldor | create | |