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)→

Original post →

More from coding & agent

coding & agent channel →