Mega Code Archive

 
Categories / Python Tutorial / Class
 

An example of using a class data attribute (foo)

class C(object):      foo = 100 print C.foo C.foo = C.foo + 1 print C.foo