Given following code:
def A() : b = 1 def B() : # I can access \'b\' from here. print( b ) # But can i modify \'b\' here? \'
No you cannot, at least in this way.
Because the "set operation" will create a new name in the current scope, which covers the outer one.