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.
>From the inner function I want to access a variable from the outer
function like;

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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to