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
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
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