Re: Variable scope in nested functions

2018-01-29 Thread Prahallad Achar
Thanks Chris, Without using nonlocal any other options available? On 30 Jan 2018 8:30 am, "Chris Angelico" wrote: > On Tue, Jan 30, 2018 at 1:48 PM, Prahallad Achar > wrote: > > def a() : > > Print (value) > > def b() : > > Value = 100 > > Return b > > > > Its a nested func

Re: Variable scope in nested functions

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 1:48 PM, Prahallad Achar wrote: > def a() : > Print (value) > def b() : > Value = 100 > Return b > > Its a nested function. How can I use variable value just one function > above the parent function. > This is possible in tcl.. Is it possible in Python

Variable scope in nested functions

2018-01-29 Thread Prahallad Achar
def a() : Print (value) def b() : Value = 100 Return b Its a nested function. How can I use variable value just one function above the parent function. This is possible in tcl.. Is it possible in Python too? -- https://mail.python.org/mailman/listinfo/python-list