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

```
Module(
    ModModule {
        range: 0..30,
        body: [
            FunctionDef(
                StmtFunctionDef {
                    range: 0..29,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: "foo",
                        range: 4..7,
                    },
                    type_params: None,
                    parameters: Parameters {
                        range: 7..24,
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 8..12,
                                parameter: Parameter {
                                    range: 8..9,
                                    name: Identifier {
                                        id: "a",
                                        range: 8..9,
                                    },
                                    annotation: None,
                                },
                                default: Some(
                                    NumberLiteral(
                                        ExprNumberLiteral {
                                            range: 10..12,
                                            value: Int(
                                                10,
                                            ),
                                        },
                                    ),
                                ),
                            },
                            ParameterWithDefault {
                                range: 14..15,
                                parameter: Parameter {
                                    range: 14..15,
                                    name: Identifier {
                                        id: "b",
                                        range: 14..15,
                                    },
                                    annotation: None,
                                },
                                default: None,
                            },
                            ParameterWithDefault {
                                range: 17..23,
                                parameter: Parameter {
                                    range: 17..23,
                                    name: Identifier {
                                        id: "c",
                                        range: 17..18,
                                    },
                                    annotation: Some(
                                        Name(
                                            ExprName {
                                                range: 20..23,
                                                id: "int",
                                                ctx: Load,
                                            },
                                        ),
                                    ),
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                range: 26..29,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        range: 26..29,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
        ],
    },
)
```
## Errors

  |
1 | def foo(a=10, b, c: int): ...
  |               ^ Syntax Error: Parameter without a default cannot follow a parameter with a default
  |


  |
1 | def foo(a=10, b, c: int): ...
  |                  ^^^^^^ Syntax Error: Parameter without a default cannot follow a parameter with a default
  |
