[Python-ideas] Serializable method

Guido van Rossum guido at python.org
Fri Mar 9 23:40:48 CET 2012


So what's your proposal)

--Guido van Rossum (sent from Android phone)
On Mar 9, 2012 2:38 PM, "anatoly techtonik" <techtonik at gmail.com> wrote:

> Pickle is insecure, unfortunately, so a generic module to serialize
> and unserialize Python objects (or data containers) securely, without
> the need of constructor, would be awesome. However, magical methods
> are evil. It will be hard to find the source of error if the logic in
> your magic level fail.
> --
> anatoly t.
>
>
>
> On Fri, Mar 9, 2012 at 8:27 PM, Jakob Bowyer <jkbbwr at gmail.com> wrote:
> > 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
> >
> >
> >
> > _______________________________________________
> > Python-ideas mailing list
> > Python-ideas at python.org
> > http://mail.python.org/mailman/listinfo/python-ideas
> >
> _______________________________________________
> 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/f3b17c2e/attachment.html>


More information about the Python-ideas mailing list