[Python-3000] Immutable bytes type and dbm modules

Jason Orendorff jason.orendorff at gmail.com
Thu Aug 9 18:34:11 CEST 2007


On 8/9/07, Joel Bender <jjb5 at cornell.edu> wrote:
> Jason Orendorff wrote:
> > Hooks would help with that, or even eliminate the need altogether.
>
> IMHO, having a __bytes__ method would go a long way.

Well, it would go halfway--you also need to deserialize.
__bytes__ alone would be useless.

Of course Python does have a library for serializing and
deserializing practically anything: pickle.  What I proposed
is a generalization of shelve.

  http://docs.python.org/lib/module-shelve.html

-j


More information about the Python-3000 mailing list