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

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..88,
        body: [
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 43..57,
                    value: Set(
                        ExprSet {
                            node_index: AtomicNodeIndex(..),
                            range: 43..57,
                            elts: [
                                Named(
                                    ExprNamed {
                                        node_index: AtomicNodeIndex(..),
                                        range: 44..50,
                                        target: Name(
                                            ExprName {
                                                node_index: AtomicNodeIndex(..),
                                                range: 44..45,
                                                id: Name("x"),
                                                ctx: Store,
                                            },
                                        ),
                                        value: NumberLiteral(
                                            ExprNumberLiteral {
                                                node_index: AtomicNodeIndex(..),
                                                range: 49..50,
                                                value: Int(
                                                    1,
                                                ),
                                            },
                                        ),
                                    },
                                ),
                                NumberLiteral(
                                    ExprNumberLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 52..53,
                                        value: Int(
                                            2,
                                        ),
                                    },
                                ),
                                NumberLiteral(
                                    ExprNumberLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 55..56,
                                        value: Int(
                                            3,
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    node_index: AtomicNodeIndex(..),
                    range: 58..87,
                    value: SetComp(
                        ExprSetComp {
                            node_index: AtomicNodeIndex(..),
                            range: 58..87,
                            elt: Named(
                                ExprNamed {
                                    node_index: AtomicNodeIndex(..),
                                    range: 59..68,
                                    target: Name(
                                        ExprName {
                                            node_index: AtomicNodeIndex(..),
                                            range: 59..63,
                                            id: Name("last"),
                                            ctx: Store,
                                        },
                                    ),
                                    value: Name(
                                        ExprName {
                                            node_index: AtomicNodeIndex(..),
                                            range: 67..68,
                                            id: Name("x"),
                                            ctx: Load,
                                        },
                                    ),
                                },
                            ),
                            generators: [
                                Comprehension {
                                    range: 69..86,
                                    node_index: AtomicNodeIndex(..),
                                    target: Name(
                                        ExprName {
                                            node_index: AtomicNodeIndex(..),
                                            range: 73..74,
                                            id: Name("x"),
                                            ctx: Store,
                                        },
                                    ),
                                    iter: Call(
                                        ExprCall {
                                            node_index: AtomicNodeIndex(..),
                                            range: 78..86,
                                            func: Name(
                                                ExprName {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 78..83,
                                                    id: Name("range"),
                                                    ctx: Load,
                                                },
                                            ),
                                            arguments: Arguments {
                                                range: 83..86,
                                                node_index: AtomicNodeIndex(..),
                                                args: [
                                                    NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 84..85,
                                                            value: Int(
                                                                3,
                                                            ),
                                                        },
                                                    ),
                                                ],
                                                keywords: [],
                                            },
                                        },
                                    ),
                                    ifs: [],
                                    is_async: false,
                                },
                            ],
                        },
                    ),
                },
            ),
        ],
    },
)
```
