---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/inline/ok/parenthesized_compare_expr_in_for.py
---
## AST

```
Module(
    ModModule {
        range: 0..60,
        body: [
            For(
                StmtFor {
                    range: 0..28,
                    is_async: false,
                    target: Subscript(
                        ExprSubscript {
                            range: 4..15,
                            value: Compare(
                                ExprCompare {
                                    range: 5..11,
                                    left: Name(
                                        ExprName {
                                            range: 5..6,
                                            id: "x",
                                            ctx: Load,
                                        },
                                    ),
                                    ops: [
                                        In,
                                    ],
                                    comparators: [
                                        Name(
                                            ExprName {
                                                range: 10..11,
                                                id: "y",
                                                ctx: Load,
                                            },
                                        ),
                                    ],
                                },
                            ),
                            slice: NumberLiteral(
                                ExprNumberLiteral {
                                    range: 13..14,
                                    value: Int(
                                        0,
                                    ),
                                },
                            ),
                            ctx: Store,
                        },
                    ),
                    iter: Name(
                        ExprName {
                            range: 19..23,
                            id: "iter",
                            ctx: Load,
                        },
                    ),
                    body: [
                        Expr(
                            StmtExpr {
                                range: 25..28,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 25..28,
                                    },
                                ),
                            },
                        ),
                    ],
                    orelse: [],
                },
            ),
            For(
                StmtFor {
                    range: 29..59,
                    is_async: false,
                    target: Attribute(
                        ExprAttribute {
                            range: 33..46,
                            value: Compare(
                                ExprCompare {
                                    range: 34..40,
                                    left: Name(
                                        ExprName {
                                            range: 34..35,
                                            id: "x",
                                            ctx: Load,
                                        },
                                    ),
                                    ops: [
                                        In,
                                    ],
                                    comparators: [
                                        Name(
                                            ExprName {
                                                range: 39..40,
                                                id: "y",
                                                ctx: Load,
                                            },
                                        ),
                                    ],
                                },
                            ),
                            attr: Identifier {
                                id: "attr",
                                range: 42..46,
                            },
                            ctx: Store,
                        },
                    ),
                    iter: Name(
                        ExprName {
                            range: 50..54,
                            id: "iter",
                            ctx: Load,
                        },
                    ),
                    body: [
                        Expr(
                            StmtExpr {
                                range: 56..59,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 56..59,
                                    },
                                ),
                            },
                        ),
                    ],
                    orelse: [],
                },
            ),
        ],
    },
)
```
