J
Jorgen Bodde
Hi all,
I wanted to solve a small problem, and I have a function that is
typically meant only as a function belonging inside another function.
def A():
some_var = 1
def B():
some_var += 1
B()
But this does not work, the function B does not recognize the
some_var. In my mind I thought the scope would propagate to the new
function and the vars would still be accessible.
How can I go about this?
With regards
- Jorgen
I wanted to solve a small problem, and I have a function that is
typically meant only as a function belonging inside another function.
function like;From the inner function I want to access a variable from the outer
def A():
some_var = 1
def B():
some_var += 1
B()
But this does not work, the function B does not recognize the
some_var. In my mind I thought the scope would propagate to the new
function and the vars would still be accessible.
How can I go about this?
With regards
- Jorgen