Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
At least part of the problem has nothing to do with subclassing from int and instead is related to pickling objects with circular references. I am attaching a patch that demonstrates the problem. In issue1581183-test.diff, I modified memoize so that it does nothing rather than fails an assert if object is already in the memo. This makes python and C implementations behave the same, but still fail to produce correct results. Pickling with protocol 2 break circular reference and instead creates two independent objects. ---------- assignee: -> belopolsky keywords: +patch Added file: http://bugs.python.org/file17800/issue1581183-test.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1581183> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com