cpython/Lib/test/test_future_stmt/nested_scope.py
Nikita Sobolev 94c95d42a3
gh-109485: Further improve test_future_stmt tests (#109486)
Add assertSyntaxError() which run tests with an additional docstring
and without docstring, and checks for the error message.
2023-09-19 14:01:59 +02:00

10 lines
149 B
Python

"""This is a test"""
from __future__ import nested_scopes; import site
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)