ruff/crates/ty_python_semantic/resources/mdtest/loops
Douglas Creager e0149cd9f3
[ty] Return a tuple spec from the iterator protocol (#19496)
This PR updates our iterator protocol machinery to return a tuple spec
describing the elements that are returned, instead of a type. That
allows us to track heterogeneous iterators more precisely, and
consolidates the logic in unpacking and splatting, which are the two
places where we can take advantage of that more precise information.
(Other iterator consumers, like `for` loops, have to collapse the
iterated elements down to a single type regardless, and we provide a new
helper method on `TupleSpec` to perform that summarization.)
2025-07-23 17:11:44 -04:00
..
async_for.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
for.md [ty] Return a tuple spec from the iterator protocol (#19496) 2025-07-23 17:11:44 -04:00
iterators.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
while_loop.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00