summaryrefslogtreecommitdiff
path: root/tests/functional/n/nested_func_defined_in_loop.py
blob: 39d2889a4434c85f2467e8998ab31385cde589bc (plain)
1
2
3
4
5
6
7
8
9
10
"""Check a nested function defined in a loop."""

def example(args):
    """The check"""
    for i in args:
        def nested():
            print(i)  # [cell-var-from-loop]
        nested()
    for i in args:
        print(i)