Skip to content

yggdrasil.pickle.ser.collections

collections

CollectionSerialized dataclass

CollectionSerialized(head: Header, data: IO)

Bases: Serialized[T], Generic[T]

Base class for count-prefixed collection payloads.

Standard wire format — ordered collections:

[count:u32][item_0][item_1]...[item_n]

Mapping collections:

[count:u32][key_0][value_0]...[key_n][value_n]

module_and_name staticmethod

module_and_name(obj: Any, *, fallback: str = '') -> tuple[str, str]

Return (module, qualname) for obj.

Robust across Python objects, including many C-extension / PyArrow objects where module may be missing or misleading.