tessl install tessl/pypi-aenum@3.1.0Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.21x
Baseline
Agent success rate without this tile
63%
A tuple-like shipment record with optional defaults and helpers for loading and transformation.
id (int), destination (str), weight (float, default 0.0), and priority (str, default "standard"); attribute and index access expose the same ordered data. @testload_shipments consumes an iterable of sequences, producing record instances; missing trailing optional values use defaults while required id and destination must be present. @testto_mapping returns an ordered mapping of field names to values, and update_priority returns a new record with only the priority changed, leaving the original untouched. @test@generates
from collections.abc import Iterable, Sequence
from typing import Any
class ShipmentRecord:
id: int
destination: str
weight: float
priority: str
def load_shipments(rows: Iterable[Sequence[Any]]) -> list[ShipmentRecord]:
"""Create records from sequences, applying defaults for missing optional values."""
def to_mapping(record: ShipmentRecord) -> dict[str, Any]:
"""Return an ordered mapping of field names to values."""
def update_priority(record: ShipmentRecord, new_priority: str) -> ShipmentRecord:
"""Return a new record with updated priority without mutating the original."""Provides a tuple-style record factory with defaults and dual attribute/index access. @satisfied-by