tessl install tessl/github-python--cpython@3.13.0CPython is the reference implementation of the Python programming language providing the core interpreter, runtime system, and comprehensive standard library.
Agent Success
Agent success rate when using this tile
96%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.07x
Baseline
Agent success rate without this tile
90%
Transforms purchase lines into aggregated totals using native runtime types and standard exception semantics.
["coffee,3", "bagel,2", "coffee,-1"] produce a mapping with exactly two keys: coffee totals 2 and bagel totals 2. @test"brokenline") aborts processing and raises a built-in exception for malformed input. @test"tea,2.5"), raise the built-in exception associated with invalid numeric conversion. @testNone raises the built-in type-mismatch exception before any parsing is attempted. @test@generates
from typing import Iterable, Mapping
def normalize_entries(lines: Iterable[str]) -> Mapping[str, int]:
"""Parse comma-delimited lines of <category>,<integer amount> into aggregated totals using native mapping and integer primitives."""
def category_total(summary: Mapping[str, int], category: str) -> int:
"""Return the total for the requested category from a normalized summary or raise the native missing-key exception."""Native runtime types for sequences/mappings, conversion helpers, and standard exception hierarchy.