ty 1.0 demo: satisfies_all infers length-plus-integer constraints across predicates
charliermarsh · x · 2026-12-02
Charlie Marsh (Astral) shares an example from the ty 1.0 blog post: satisfiesall conjoins an arbitrary number of predicates. In the demo, validbatch requires an input that has a length and yields integers — ty infers this and accepts [1, 2, 3] while rejecting iter([1, 2, 3]) (iterators lack a length), showcasing the type checker's inference over compound predicates.
More from coding & agent
- Spawn founder: naming each agent stops Claudes from rubber-stamping each other's bad work — TAbrodi · 2026-12-02
- Nano 2.1 vs GPT Img 2.6 compared: Fable + Three.js + Seedream pipeline for controllable renders — Ror_Fly · 2026-12-02
- One prompt, full autonomous run: agent finds a trend, makes song and video in 2h41m — tetsuoai · 2026-12-02
- YouTube explainer breaks down how MCP actually works — S20091981 · 2026-12-02
- Ruff author contrasts type inference: ty vs Mypy vs Pyright vs Pyrefly on one example — charliermarsh · 2026-12-02
- Danny Postma launches a landing-page course your coding agent takes with you — doooyle · 2026-12-02