--- 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