3 ms·
> Never understood why this isn’t used more frequently. Can you throw a JSON-serializable data structure (lists, dict, strings, numbers) into SharedMemory? Wha
by perlgeek 1y ago
> Never understood why this isn’t used more frequently.
Can you throw a JSON-serializable data structure (lists, dict, strings, numbers) into SharedMemory? What about regular instance of random Python classes? If the answer is "no", that explains why it's not done more often.
The examples in the docs seem to pass byte strings and byte arrays around, which is far less convenient than regular data structures.
- dragonwriter 1y ago> Can you throw a JSON-serializable data structure (lists, dict, strings, numbers) into SharedMemory? You can throw a JSON-serialized data structure into SharedMemory, sure, since you can store strings. > The examples in the docs seem to pass byte strings and byte arrays around The examples in the docs largely use ShareableList, which itself can contain any of int, float, bool, str, bytes, and None-type values.