← Back to team overview

yade-users team mailing list archive

Re: [Question #235985]: Highest clump position in clump cloud

 

Question #235985 on Yade changed:
https://answers.launchpad.net/yade/+question/235985

Bruno Chareyre proposed the following answer:
"global" is the keyword.
Bruno

a=0
def f():
    a=1
    print a

f()
>> 1
print a
>> 0


a=0
def f():
    global a
    a=1
    print a

f()
>> 1
print a
>> 1

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.