Skip to content

Instantly share code, notes, and snippets.

@masnun
Created August 19, 2012 14:09
Show Gist options
  • Save masnun/3395037 to your computer and use it in GitHub Desktop.
Save masnun/3395037 to your computer and use it in GitHub Desktop.
Pythonic Eid Greeting
#!/usr/bin/env python
class Eid(object):
def __get__(self,instance,owner):
return "Eid-Ul-Fitr "
class Salutation(object):
def __get__(self,instance,owner):
return "Mubarak!"
class Celebration:
ocassion = Eid()
salutation = Salutation()
def greet(self):
print "Wishing you a pythonic " + self.ocassion + self.salutation
if __name__ == "__main__":
celebration = Celebration()
celebration.greet()
@sarim
Copy link

sarim commented Aug 19, 2012

http://ideone.com/jZVZL Live Edition ;)

@aniruddha-adhikary
Copy link

Sarim always has something down the his forks!

@anupdebnath
Copy link

github should have a like button :D

@masnun
Copy link
Author

masnun commented Aug 19, 2012

🐸 Gittu is the man! 💡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment