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 Trundle
Recipients Trundle, aerojockey, barry, terry.reedy
Date 2011-03-20.04:41:57
SpamBayes Score 7.938095e-15
Marked as misclassified No
Message-id <AANLkTi=CxmA53e59xaYqhwcZsepPiFPvAZdkhkE-3mUj@mail.gmail.com>
In-reply-to <1300495310.36.0.352191959863.issue11603@psf.upfronthosting.co.za>
Content
On Sat, Mar 19, 2011 at 12:41 AM, Terry J. Reedy <report@bugs.python.org> wrote:
> Whether or not this fixes issue ('should' is a bit vague, confirmation is needed) this seems like a good idea.

Yes, it fixes the issue. I wrote "should" because I was a bit in a
hurry and hadn't put much thought into whether it's the best way to
fix that issue (or if there even is an issue that should be fixed).
Now that I thought a bit more about it, I think it's a decent fix for
the issue. There is still the possibility that a custom __repr__
method calls `object.__str__`, but that will either raise a
RuntimeError at some point (due to stack exhaustion; if the method is
a Python method) or it's a case of "well, don't do that" (if the
method is implemented in C).

> However, I also do not know where to put it as there is no test_object or test_typeobject file that I see.

I updated the patch and put a test into test_class which seemed like a
good place for it to me. Also, I did the patch against the 3.1 branch
this time, so it can be forward-ported.
History
Date User Action Args
2011-03-20 04:41:58Trundlesetrecipients: + Trundle, barry, terry.reedy, aerojockey
2011-03-20 04:41:57Trundlelinkissue11603 messages
2011-03-20 04:41:57Trundlecreate