fork(2) download
  1. class Eid(object):
  2. def __get__(self,instance,owner):
  3. return "Eid-Ul-Fitr "
  4.  
  5.  
  6. class Salutation(object):
  7. def __get__(self,instance,owner):
  8. return "Mubarak!"
  9.  
  10.  
  11. class Celebration:
  12. ocassion = Eid()
  13. salutation = Salutation()
  14.  
  15. def greet(self):
  16. print "Wishing you a pythonic " + self.ocassion + self.salutation
  17.  
  18.  
  19. if __name__ == "__main__":
  20. celebration = Celebration()
  21. celebration.greet()
Success #stdin #stdout 0.09s 10864KB
stdin
Standard input is empty
stdout
Wishing you a pythonic Eid-Ul-Fitr Mubarak!