In a fit of genius while I was surfing the net, I came up with a python implementation of the song "Happy Birthday". It's totally sweet!
you = Person()
for i in range(0, 4):
if i == 2:
you.name = happy_birthday
else:
you = happy_birthday
Sometimes my genius is a little subtle, so here's how it works:
- 'you' is an instance of a 'Person' object.
- The 'you = happy_birthday' is assigning "happy_birthday to you".
- The third time through 'happy_birthday' is assigned to the person objects 'name'. So if the person objects name was 'Scott', this would be assigning "happy_birthday to Scott".
And just for fun, I wrote a one liner that will print out the happy birthday song, using python:
for i in range(0, 4): print "Happy Birthday", ((i == 2 and ("Dear Scott",)) or ("to you",))[0]
pet transport on Adding a simple twitter feed to your Drupal site
Mobiles on Chiang Mai - Baan Chang Elephant Park
Tony Imtiaz on An overview of D7 install profiles
gewinnspiele on Adding a simple twitter feed to your Drupal site
Victor Crum on In defence of train travel
Sean Lowe on Nobody NEEDS a cellphone