A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/023904.html below:

[Python-Dev] buffer objects

[Python-Dev] buffer objectsScott Gilbert xscottg@yahoo.com
Thu, 2 May 2002 08:49:01 -0700 (PDT)
--- Fredrik Lundh <fredrik@pythonware.com> wrote:
> 
> umm.  pickles are supposed to be machine-independent, so how can you
> pickle stuff built on buffers *without* taking types/sizes/endianess into
> account?
> 

:-)

It's not that I, personally, wouldn't have to take type/size/endianness
into account if I built something on top of a buffer in which
type/size/endianness matters.  It's that I wouldn't have to get a concensus
from anyone else on how to do so.

I'd define my __getstate__/__setstate__ for a class to work with a tuple of
(type, endian, size, buffer, ...) if needed, and someone else could define
theirs however fit their needs.  The buffer itself would just pickle from
mutable-bytes to mutable-bytes (hopefully with the same alignment that
malloc provides for the native machine).

Cheers,
    -Scott


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4