[Python-ideas] Serializable method
Jakob Bowyer
jkbbwr at gmail.com
Fri Mar 9 18:27:14 CET 2012
Another occasion I should have read the docs :L
On Fri, Mar 9, 2012 at 5:22 PM, Oleg Broytman <phd at phdru.name> wrote:
> On Fri, Mar 09, 2012 at 05:05:51PM +0000, Jakob Bowyer wrote:
> > I think that object should provide an __serializable__ method which
> in-turn
> > allows the user to define in it how the object is to be serialized, the
> > default operation should be something along the lines of return
> > self.__dict__
>
> Do you mean __getstate__?
> http://docs.python.org/library/pickle.html#the-pickle-protocol
>
> Oleg.
> --
> Oleg Broytman http://phdru.name/ phd at phdru.name
> Programmers don't die, they just GOSUB without RETURN.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120309/523c0c1b/attachment.html>
More information about the Python-ideas
mailing list