Re: [OT] Any Python lullabies?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: [OT] Any Python lullabies?

From: A.M. Kuchling <amk@amk.ca>
Date: Tue Apr 18 2006 - 16:14:53 CEST

On Tue, 18 Apr 2006 07:07:27 -0500,
        Tim Chase <python.list@tim.thechases.com> wrote:
> >>> [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
Received on Sun Apr 30 23:30:36 2006