Hi,

Following is my code:
#############################################
class Animal():

      flag = True
      print flag

      def __init__(self,name):
           self.name = name
           print self.name

      def walk(self):
          print "I am walking"


if __name__ == '__main__':
     test = Animal('boxer')
     test.flag = False
     test.walk()

#############################################




My question is:
____________

1)Inside the Animal class(), How can I set the variable 'flag' to FALSE?


Regards,
Reuben
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to