[pypy-dev] how can i pickle an application-level object from interpreter code?
arigo at tunes.org
Sat Oct 3 01:30:29 CEST 2009
On Fri, Oct 02, 2009 at 09:35:30AM -0700, Philip Guo wrote:
> I'm brand-new to PyPy, and here is my question: I want to selectively pickle
> Python objects that appear in application-level code, from *within* the
What about writing a metaclass and keeping it all as portable, regular
Python code? E.g.
def __call__(self, *args, **kwds):
x = type.__call__(self, *args, **kwds)
__metaclass__ = MetaPickle
There are also ways to do it by patching the classes without changing
anything to their definition. If you need more information about these
solutions, please ask in a general Python list.
More information about the Pypy-dev