mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
reflect with statements with multiple items in the AST (closes #12106)
This commit is contained in:
parent
0501070669
commit
bf1bbc1452
7 changed files with 182 additions and 85 deletions
|
|
@ -28,7 +28,7 @@ module Python
|
|||
| For(expr target, expr iter, stmt* body, stmt* orelse)
|
||||
| While(expr test, stmt* body, stmt* orelse)
|
||||
| If(expr test, stmt* body, stmt* orelse)
|
||||
| With(expr context_expr, expr? optional_vars, stmt* body)
|
||||
| With(withitem* items, stmt* body)
|
||||
|
||||
| Raise(expr? exc, expr? cause)
|
||||
| TryExcept(stmt* body, excepthandler* handlers, stmt* orelse)
|
||||
|
|
@ -115,5 +115,7 @@ module Python
|
|||
|
||||
-- import name with optional 'as' alias.
|
||||
alias = (identifier name, identifier? asname)
|
||||
|
||||
withitem = (expr context_expr, expr? optional_vars)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue