Another ty catch: forgetting to call any() on a generator, which is always truthy
charliermarsh · x · 2026-09-25
ty author Charlie Marsh shared another classic case for always-true condition detection: forgetting to call any (or similar) on a generator — the generator object itself is always truthy regardless of whether it's ultimately empty.
Related event: ty Adds Always-True/Always-False Condition Detection(2 posts)→
More from coding & agent
- Clinician-Reviewed Child Psychiatry MCP Library Launches on Glama — modelcontextprotocol · 2026-09-25
- Brainiall MCP Server Brings Phoneme-Level Speech Assessment to Agents — modelcontextprotocol · 2026-09-25
- Plan Mode rework: customizable prompt, shareable modes, rebindable Shift+Tab — trq212 · 2026-09-25
- Firecrawl raises $75M Series B, targets $100M ARR with fewer than 50 people — devdigest · 2026-09-25
- Hill Sampling: Condition on the Best Verified Solution, Generate 512 Parallel Edits, Repeat — LChoshen · 2026-09-25
- Free Public MCP Server Exposes Canadian Privacy Law Data: 263 Terms, CAI Cases — masiha97 · 2026-09-25