Jason wrote:
I'm reusing the __getstate__ function I wrote for pickling like
so:
Instead of reinventing part of pickle, is there some reason
you couldn't just use it?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I want to send objects (new style) over DBUS. DBUS can only send
fairly primitive types[1] so I turn my objects into dicts and send
that. I'm reusing the __getstate__ function I wrote for pickling like
so:
def __getstate__(self):
attrs = self.__dict__.copy()
return attrs
Jason a écrit :
Hi,
I want to send objects (new style) over DBUS. DBUS can only send
fairly primitive types[1] so I turn my objects into dicts and send
that. I'm reusing the __getstate__ function I wrote for pickling like
so:
def __getstate__(self):
attrs = self.__dict__.copy()
On Mar 26, 12:00 am, Bruno Desthuilliers bruno.
42.desthuilli...@websiteburo.invalid wrote:
attrs['type'] = type(self)
Do the same thing with less work !-)
Ah, silly me :P
attrs['__typename__'] = type(self).__name__
That's exactly what I needed — I was not aware of the