New submission from Mahdi Jafary <mahdi.ueser...@gmail.com>:

this code is ok
def test(t):
        n = 0
        def f(t):
                print(t+str(N))
        f(t)    
test('test')
but this code have error

def test(t):
        n = 0
        def f(t):
                n = n+1
                print(t+str(n))
        f(t)    
test('test')    

we can fix this by edit code to:

def test(t):
        n = 0
        def f(t):
                N = n+1
                print(t+str(N))
        f(t)    
test('test')

----------
components: Windows
messages: 345238
nosy: Mahdi Jafary, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: error in variable
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37234>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to