ruff/crates/ruff_python_parser/resources/valid/statement/for.py

38 lines
523 B
Python

for target in iter:
pass
for target in (1, 2, 3):
pass
for target.attr in call():
pass
for target[0] in x.attr:
pass
for target in x <= y:
pass
for target in a and b:
pass
for a, b, c, in iter:
pass
for (a, b) in iter:
pass
for target in [1, 2]:
pass
for target in await x: ...
for target in lambda x: x: ...
for target in x if True else y: ...
if x:
for target in iter:
pass
# This `else` is not part of the `try` statement, so don't raise an error
else:
pass