create global variables?

2006-10-30 Thread aking
J. Clifford Dyer wrote: > Alistair King wrote: > >> Hi, >> >> is there a simple way of creating global variables within a function? >> >> ive tried simply adding the variables in: >> >> def function(atom, Xaa, Xab): >> Xaa = onefunction(atom) >> Xab = anotherfunction(atom) >> >> if i c

[no subject]

2006-10-30 Thread aking
J. Clifford Dyer wrote: > Alistair King wrote: > >> Hi, >> >> is there a simple way of creating global variables within a function? >> >> ive tried simply adding the variables in: >> >> def function(atom, Xaa, Xab): >> Xaa = onefunction(atom) >> Xab = anotherfunction(atom) >> >> if i ca

Re: help - iter & dict

2006-08-03 Thread aking
Quoting taleinat <[EMAIL PROTECTED]>: > Ali writes: > > >> Im trying to iterate through values in a dictionary so i can find the > >> closest value and then extract the key for that valuewhat ive done > so far: > >> > >> def pcloop(dictionary, exvalue): > >> z = dictionary.itervalues

help - iter & dict

2006-08-03 Thread aking
Dear Python people, im a newbie to python and here...so hello! Im trying to iterate through values in a dictionary so i can find the closest value and then extract the key for that valuewhat ive done so far: def pcloop(dictionary, exvalue): z = dictionary.itervalues() y = z