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]
hadfield on Creating Custom Triggers in Drupal
awolfey on Creating Custom Triggers in Drupal
hadfield on Creating Custom Triggers in Drupal
awolfey on Creating Custom Triggers in Drupal
little sa on my first massage (now with happy ending)
Smath on What's for breakfast? How about 175 thousand calories?