This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients barry, cvrebert, exarkun, ezio.melotti, ncoghlan, pitrou, rbcollins
Date 2009-12-13.04:49:11
SpamBayes Score 4.583583e-07
Marked as misclassified No
Message-id <1260679754.74.0.0480987426919.issue6108@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-12-13 04:49:14ncoghlansetrecipients: + ncoghlan, barry, exarkun, pitrou, rbcollins, ezio.melotti, cvrebert
2009-12-13 04:49:14ncoghlansetmessageid: <1260679754.74.0.0480987426919.issue6108@psf.upfronthosting.co.za>
2009-12-13 04:49:12ncoghlanlinkissue6108 messages
2009-12-13 04:49:12ncoghlancreate