member variables in python

PyPK superprad at gmail.com
Fri Mar 31 10:33:10 EST 2006


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?




More information about the Python-list mailing list