Message9809
This code recurses infinitely on Jython2.7RC2:
>>> class X(object):
... def __reduce__(self): return object.__reduce__(self)
...
>>> X().__reduce__()
Traceback (most recent call last):
...
RuntimeError: maximum recursion depth exceeded (Java StackOverflowError)
But works fine on CPython 2.7 and PyPy 2.5:
>>> class X(object):
... def __reduce__(self): return object.__reduce__(self)
...
>>> X().__reduce__()
(<function _reconstructor at 0x1028912a8>, (<class '__main__.X'>, <type 'object'>, None))
Interestingly, using `super(X,self).__reduce__()` works correctly.
I suspect this may be a known issue because the tests for it were disabled in https://hg.python.org/jython/rev/c82067c0766f. |
|
Date |
User |
Action |
Args |
2015-04-13 18:23:09 | jmadden | set | messageid: <1428949389.77.0.536153134809.issue2323@psf.upfronthosting.co.za> |
2015-04-13 18:23:09 | jmadden | set | recipients:
+ jmadden |
2015-04-13 18:23:09 | jmadden | link | issue2323 messages |
2015-04-13 18:23:09 | jmadden | create | |
|