Classes, BTW, do work:
class Global():
pass
G = Global()
G.k = 1000
def decK():
G.k = G.k - 1
return G.k
... etc...
Works as an assignable global variable.
Alternately, scalars could be one element lists, and assignment
done with replacement of the list element.
( Or put all (module wide) globals into a dictionary and replace
the values ? - I haven't tried that yet. )
Possibly my problems originated with a poor design in the first place -
( Stuffing things into globals was a quick hack to test an additional
feature. ) But I do think those issues DO need to be made clear(er)
in the user-guide. Reading the misc/CLASSES doc helped, but I don't
think the logic is explicitly spelled out in the user guide.
- Steve