Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
I am attaching a patch which focuses on fixing _pickle behavior. I opened a separate issue9102 to deal with pybench specific problems. Marc-Andre, I am reassigning this issue to myself and assigning issue9102 to you. I hope you don't mind. My patch attempts to emulate 2.x PyInstance_NewRaw with a call to tp_alloc. I considered using tp_new, but although __new__ is not special for classic classes, there is nothing to prevent users to define __new__ in their classic classes or add __new__ when they port these classes to 3.x. (BTW, I wonder what 2to3 does if classic class has __new__ defined.) This is slightly unorthodox use of tp_alloc, so I will follow up with a question on python-dev. ---------- assignee: lemburg -> belopolsky nosy: +mark.dickinson Added file: http://bugs.python.org/file17792/issue5180.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5180> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com