Hello all, what's the Python way of accessing local variables in nesting functions? For example if I have:
def p(): � var1 = 3 � def q(): � � �print 'var1 in p is', var1 � q() then there's no problem in running such function, but what if I'd like to modify var1 so that the change were vissible in p()? I can't label var1 as global in q, because it then creates a new var1 in the module scope, leaving the nested one untouched. Thanks in advance _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
