---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/valid/statement/return.py
---
## AST

```
Module(
    ModModule {
        range: 0..167,
        body: [
            Return(
                StmtReturn {
                    range: 0..6,
                    value: None,
                },
            ),
            Return(
                StmtReturn {
                    range: 7..15,
                    value: Some(
                        Name(
                            ExprName {
                                range: 14..15,
                                id: Name("x"),
                                ctx: Load,
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 16..29,
                    value: Some(
                        Tuple(
                            ExprTuple {
                                range: 23..29,
                                elts: [
                                    Starred(
                                        ExprStarred {
                                            range: 23..25,
                                            value: Name(
                                                ExprName {
                                                    range: 24..25,
                                                    id: Name("x"),
                                                    ctx: Load,
                                                },
                                            ),
                                            ctx: Load,
                                        },
                                    ),
                                    Starred(
                                        ExprStarred {
                                            range: 27..29,
                                            value: Name(
                                                ExprName {
                                                    range: 28..29,
                                                    id: Name("y"),
                                                    ctx: Load,
                                                },
                                            ),
                                            ctx: Load,
                                        },
                                    ),
                                ],
                                ctx: Load,
                                parenthesized: false,
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 30..45,
                    value: Some(
                        Named(
                            ExprNamed {
                                range: 38..44,
                                target: Name(
                                    ExprName {
                                        range: 38..39,
                                        id: Name("x"),
                                        ctx: Store,
                                    },
                                ),
                                value: NumberLiteral(
                                    ExprNumberLiteral {
                                        range: 43..44,
                                        value: Int(
                                            1,
                                        ),
                                    },
                                ),
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 46..57,
                    value: Some(
                        NoneLiteral(
                            ExprNoneLiteral {
                                range: 53..57,
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 58..72,
                    value: Some(
                        BoolOp(
                            ExprBoolOp {
                                range: 65..72,
                                op: And,
                                values: [
                                    Name(
                                        ExprName {
                                            range: 65..66,
                                            id: Name("x"),
                                            ctx: Load,
                                        },
                                    ),
                                    Name(
                                        ExprName {
                                            range: 71..72,
                                            id: Name("y"),
                                            ctx: Load,
                                        },
                                    ),
                                ],
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 73..85,
                    value: Some(
                        Compare(
                            ExprCompare {
                                range: 80..85,
                                left: NumberLiteral(
                                    ExprNumberLiteral {
                                        range: 80..81,
                                        value: Int(
                                            1,
                                        ),
                                    },
                                ),
                                ops: [
                                    Lt,
                                ],
                                comparators: [
                                    NumberLiteral(
                                        ExprNumberLiteral {
                                            range: 84..85,
                                            value: Int(
                                                2,
                                            ),
                                        },
                                    ),
                                ],
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 86..98,
                    value: Some(
                        Tuple(
                            ExprTuple {
                                range: 93..98,
                                elts: [
                                    NumberLiteral(
                                        ExprNumberLiteral {
                                            range: 93..94,
                                            value: Int(
                                                1,
                                            ),
                                        },
                                    ),
                                    NumberLiteral(
                                        ExprNumberLiteral {
                                            range: 96..97,
                                            value: Int(
                                                2,
                                            ),
                                        },
                                    ),
                                ],
                                ctx: Load,
                                parenthesized: false,
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 99..112,
                    value: Some(
                        Call(
                            ExprCall {
                                range: 106..112,
                                func: Name(
                                    ExprName {
                                        range: 106..110,
                                        id: Name("call"),
                                        ctx: Load,
                                    },
                                ),
                                arguments: Arguments {
                                    range: 110..112,
                                    args: [],
                                    keywords: [],
                                },
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 113..132,
                    value: Some(
                        Call(
                            ExprCall {
                                range: 120..132,
                                func: Attribute(
                                    ExprAttribute {
                                        range: 120..130,
                                        value: Name(
                                            ExprName {
                                                range: 120..124,
                                                id: Name("attr"),
                                                ctx: Load,
                                            },
                                        ),
                                        attr: Identifier {
                                            id: Name("value"),
                                            range: 125..130,
                                        },
                                        ctx: Load,
                                    },
                                ),
                                arguments: Arguments {
                                    range: 130..132,
                                    args: [],
                                    keywords: [],
                                },
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 133..147,
                    value: Some(
                        Await(
                            ExprAwait {
                                range: 140..147,
                                value: Name(
                                    ExprName {
                                        range: 146..147,
                                        id: Name("x"),
                                        ctx: Load,
                                    },
                                ),
                            },
                        ),
                    ),
                },
            ),
            Return(
                StmtReturn {
                    range: 148..166,
                    value: Some(
                        Lambda(
                            ExprLambda {
                                range: 155..166,
                                parameters: Some(
                                    Parameters {
                                        range: 162..163,
                                        posonlyargs: [],
                                        args: [
                                            ParameterWithDefault {
                                                range: 162..163,
                                                parameter: Parameter {
                                                    range: 162..163,
                                                    name: Identifier {
                                                        id: Name("x"),
                                                        range: 162..163,
                                                    },
                                                    annotation: None,
                                                },
                                                default: None,
                                            },
                                        ],
                                        vararg: None,
                                        kwonlyargs: [],
                                        kwarg: None,
                                    },
                                ),
                                body: Name(
                                    ExprName {
                                        range: 165..166,
                                        id: Name("y"),
                                        ctx: Load,
                                    },
                                ),
                            },
                        ),
                    ),
                },
            ),
        ],
    },
)
```
