[OT] Any Python lullabies?
A.M. Kuchling
amk at amk.ca
Tue Apr 18 10:14:53 EDT 2006
On Tue, 18 Apr 2006 07:07:27 -0500,
Tim Chase <python.list at 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
More information about the Python-list
mailing list