mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-104799: Default missing lists in AST to the empty list (GH-104834) (#105213)
(cherry picked from commit 77d2579586
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
d57ee813eb
commit
e6d5e63614
4 changed files with 400 additions and 239 deletions
|
@ -1591,6 +1591,8 @@ class ASTValidatorTests(unittest.TestCase):
|
|||
f = ast.FunctionDef("x", a, [ast.Pass()], [],
|
||||
ast.Name("x", ast.Store()), None, [])
|
||||
self.stmt(f, "must have Load context")
|
||||
f = ast.FunctionDef("x", ast.arguments(), [ast.Pass()])
|
||||
self.stmt(f)
|
||||
def fac(args):
|
||||
return ast.FunctionDef("x", args, [ast.Pass()], [], None, None, [])
|
||||
self._check_arguments(fac, self.stmt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue