Message218206
| Author |
Steven.Barker |
| Recipients |
Steven.Barker |
| Date |
2014年05月10日.00:35:04 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1399682105.99.0.768132721109.issue21389@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Ah, I figured out why using %R may be bad. It breaks for the following silly class:
class C():
def __repr__(self):
return repr(self.__repr__) # or use any other bound method
repr(C()) will recurse until the recursion limit is hit, both with and without my patch. If this seems like a real issue, I could probably replace the %R code with a variation on the base case code in PyObject_Repr:
PyUnicode_FromFormat("<%s object at %p>",
v->ob_type->tp_name, v) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年05月10日 00:35:06 | Steven.Barker | set | recipients:
+ Steven.Barker |
| 2014年05月10日 00:35:05 | Steven.Barker | set | messageid: <1399682105.99.0.768132721109.issue21389@psf.upfronthosting.co.za> |
| 2014年05月10日 00:35:05 | Steven.Barker | link | issue21389 messages |
| 2014年05月10日 00:35:04 | Steven.Barker | create |
|