mirror of https://github.com/astral-sh/ruff
Allow named expression in subscript: `a[b := c]`
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
201d08583a
commit
1904d095f9
|
|
@ -1023,7 +1023,7 @@ SubscriptList: ast::Expr = {
|
|||
};
|
||||
|
||||
Subscript: ast::Expr = {
|
||||
Test<"all">,
|
||||
NamedExpressionTest,
|
||||
<location:@L> <e1:Test<"all">?> ":" <e2:Test<"all">?> <e3:SliceOp?> <end_location:@R> => {
|
||||
let lower = e1.map(Box::new);
|
||||
let upper = e2.map(Box::new);
|
||||
|
|
|
|||
Loading…
Reference in New Issue