---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/invalid/expressions/yield_from/starred_expression.py
snapshot_kind: text
---
## AST

```
Module(
    ModModule {
        range: 0..100,
        body: [
            Expr(
                StmtExpr {
                    range: 70..83,
                    value: YieldFrom(
                        ExprYieldFrom {
                            range: 70..83,
                            value: Starred(
                                ExprStarred {
                                    range: 81..83,
                                    value: Name(
                                        ExprName {
                                            range: 82..83,
                                            id: Name("x"),
                                            ctx: Load,
                                        },
                                    ),
                                    ctx: Load,
                                },
                            ),
                        },
                    ),
                },
            ),
            Expr(
                StmtExpr {
                    range: 84..100,
                    value: YieldFrom(
                        ExprYieldFrom {
                            range: 84..100,
                            value: Tuple(
                                ExprTuple {
                                    range: 95..100,
                                    elts: [
                                        Starred(
                                            ExprStarred {
                                                range: 95..97,
                                                value: Name(
                                                    ExprName {
                                                        range: 96..97,
                                                        id: Name("x"),
                                                        ctx: Load,
                                                    },
                                                ),
                                                ctx: Load,
                                            },
                                        ),
                                        Name(
                                            ExprName {
                                                range: 99..100,
                                                id: Name("y"),
                                                ctx: Load,
                                            },
                                        ),
                                    ],
                                    ctx: Load,
                                    parenthesized: false,
                                },
                            ),
                        },
                    ),
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | # Yield from doesn't allow top-level starred expression unlike yield
2 | 
3 | yield from *x
  |            ^^ Syntax Error: Starred expression cannot be used here
4 | yield from *x, y
  |


  |
3 | yield from *x
4 | yield from *x, y
  |            ^^ Syntax Error: Starred expression cannot be used here
  |
