Message96322
I agree the 2.6 implementation creates backwards compatibility problems
with subclasses that only override __str__ that we didn't recognise at
the time.
An alternative approach that should work even for the KeyError case is
for BaseException_unicode to check explicitly for the situation where
the __str__ slot has been overridden but __unicode__ is still the
BaseException version and invoke "PyObject_Unicode(PyObject_Str(self))"
when it detects that situation.
That way subclasses that only override __str__ would continue to see the
old behaviour, while subclasses that don't override either would
continue to benefit from the new behaviour. |
|
| Date |
User |
Action |
Args |
| 2009-12-13 04:49:14 | ncoghlan | set | recipients:
+ ncoghlan, barry, exarkun, pitrou, rbcollins, ezio.melotti, cvrebert |
| 2009-12-13 04:49:14 | ncoghlan | set | messageid: <1260679754.74.0.0480987426919.issue6108@psf.upfronthosting.co.za> |
| 2009-12-13 04:49:12 | ncoghlan | link | issue6108 messages |
| 2009-12-13 04:49:12 | ncoghlan | create | |
|