[OT] Any Python lullabies?

C

Christos Georgiou

Since there have been python limmericks, are there any Python lullabies that
I can sing to my newborn son (actually, born yesterday)? I tried to murmur
some select parts from the tutorial, but he somehow wasn't very interested
:)
 
D

Dan Sommers

Since there have been python limmericks, are there any Python
lullabies that I can sing to my newborn son (actually, born
yesterday)? I tried to murmur some select parts from the tutorial,
but he somehow wasn't very interested :)

Then isn't that the perfect lullaby material? ;-)

Regards,
Dan
 
T

Tim Chase

Since there have been python limmericks, are there any
Python lullabies that I can sing to my newborn son
(actually, born yesterday)? I tried to murmur some
select parts from the tutorial, but he somehow wasn't
very interested :)

Well, you might start with "Twinkle, Twinkle, Little
Asterisk" or:
>>> "Blind Mice" * 3
>>> you is self.sunshine
>>> [horse for horse in horses if horse.pretty]
>>> for baby in tree.top.babies:
.... if wind.blows(): baby.cradle.rock()
.... if tree.bough.breaks():
.... fall([baby, cradle, all])
....

and last, and certainly worst:

While you're at it, if you want them to learn Vim, you can
hum them "Bram's Lullaby"... (groan)

Okay...that's a bad enough starter :)

-tkc
 
D

Dustan

Tim said:
Since there have been python limmericks, are there any
Python lullabies that I can sing to my newborn son
(actually, born yesterday)? I tried to murmur some
select parts from the tutorial, but he somehow wasn't
very interested :)

Well, you might start with "Twinkle, Twinkle, Little
Asterisk" or:
"Blind Mice" * 3
you is self.sunshine
[horse for horse in horses if horse.pretty]
for baby in tree.top.babies:
... if wind.blows(): baby.cradle.rock()
... if tree.bough.breaks():
... fall([baby, cradle, all])
...

and last, and certainly worst:

While you're at it, if you want them to learn Vim, you can
hum them "Bram's Lullaby"... (groan)

Okay...that's a bad enough starter :)

-tkc

Howsabout this?

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
 
A

A.M. Kuchling

[horse for horse in horses if horse.pretty]

I'm familiar with this one as:
all(pony for pony in ponies if pony.pretty).

Never knew there was a version with "horse", not "pony". Jane Siberry
does a nice rendition of the pony version.

There's also:

if brother_john.is_sleeping():
pass
if brother_john.is_sleeping():
pass
assert bells['morning'].is_ringing()
assert bells['morning'].is_ringing()

--amk
 
R

Robin Becker

Not a lullaby, but appropriate near easter(s)

while 1:
life.side.bright.look()
 
F

Fredrik Lundh

Dustan said:
Howsabout this?

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

sung to what tune?

(lite ipren-mannen-varning här, liksom)

</F>
 
A

Alex Martelli

Dustan said:
Howsabout this?


The Zen of Python, by Tim Peters

Beautiful is better than ugly.
...
Anna and I used it as one of our wedding's readings back in 2004
(together with other texts from Dickinson, Petrarca, Lucretius...) and I
gave a lightining talk about it at OSCON that year (titled "the first
Pythonic marriage"). I don't consider it a lullaby!-)


Alex
 
R

Ralf Muschall

Christos said:
Since there have been python limmericks, are there any Python lullabies that
I can sing to my newborn son (actually, born yesterday)? I tried to murmur
some select parts from the tutorial, but he somehow wasn't very interested
:)

There is something near the end of the Camel book (p. 552ff).
This isn't exactly python, but the baby probably won't see
the difference.

SCNR, Ralf
 
J

Jarek Zgoda

Christos Georgiou napisa³(a):
Since there have been python limmericks, are there any Python lullabies that
I can sing to my newborn son (actually, born yesterday)? I tried to murmur
some select parts from the tutorial, but he somehow wasn't very interested
:)

Your son is too small to understand all the good that comes with Python.
Let him be a usual newborn, but prepare a harness like I did for my
daughter (now nearly 2 y.o.): Tuxpaint. Now it's a big time to add
Python scripting to this proggie. ;)

Let our children see that programming can be straight and easy. Let them
express their thoughts as programs, if they wish to do so.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,294
Messages
2,571,511
Members
48,197
Latest member
ปั๊มเฟส|JoyLikeSEO

Latest Threads

Top