mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
bpo-43892: Make match patterns explicit in the AST (GH-25585)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
This commit is contained in:
parent
e52ab42ced
commit
1e7b858575
20 changed files with 3460 additions and 1377 deletions
|
|
@ -831,11 +831,7 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
|
|||
if (arena == NULL)
|
||||
goto error;
|
||||
mod = PyAST_obj2mod(source, arena, compile_mode);
|
||||
if (mod == NULL) {
|
||||
_PyArena_Free(arena);
|
||||
goto error;
|
||||
}
|
||||
if (!_PyAST_Validate(mod)) {
|
||||
if (mod == NULL || !_PyAST_Validate(mod)) {
|
||||
_PyArena_Free(arena);
|
||||
goto error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue