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 MultiSosnooley
Recipients MultiSosnooley, ezio.melotti, rhettinger, xtreak
Date 2019-02-05.21:51:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549403467.17.0.586260503293.issue35901@roundup.psfhosted.org>
In-reply-to
Content
Oh, I got it. Size is too high growing to reach recurtion limit. I replace repr with slow growing data and now there is good old recursion limit exception.

import json

class F:
    counter = 0
    total = 0
    data = b""

    def __call__(self, o):
        self.counter += 1
        self.data = b"1" + self.data
        self.total += len(self.data)
        print(self.counter, len(self.data), self.total)
        return self.data

json.dumps(object(), default=F())
History
Date User Action Args
2019-02-05 21:51:08MultiSosnooleysetrecipients: + MultiSosnooley, rhettinger, ezio.melotti, xtreak
2019-02-05 21:51:07MultiSosnooleysetmessageid: <1549403467.17.0.586260503293.issue35901@roundup.psfhosted.org>
2019-02-05 21:51:07MultiSosnooleylinkissue35901 messages
2019-02-05 21:51:07MultiSosnooleycreate