"PyPK" wrote: > hi how do I write this better with member variables rather than global > as you see below. > > eg: > > test-flag = 0 > > class AA: > def __init__(...): > > def methos(self,...): > global test-flag > test-flag = xx > > instead of something like above ..how do i put it i terms of member > variables?
you mean something like class AA: def __init__(self): self.test_flag = 0 # initialize def methods(self, value): self.test_flag = value # ... aa = AA() aa.methods(1) print aa.test_flag ? </F> -- http://mail.python.org/mailman/listinfo/python-list