Thoughts on PEP315
Stephen Horne
$$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Tue Sep 23 12:51:45 EDT 2003
On 23 Sep 2003 06:27:44 -0400, Heather Coppersmith <me at privacy.net>
wrote:
>Don't forget that values other than "True" are true, too
>(shamelessly stolen from a previous post from Tim Peters):
>
> # basic file iteration (which can be done in other ways, but
> # simply demonstrates my point)
> while "there is another line in the file":
> nextlinefromfile = getnextlinefromfile( )
> if not nextlinefromfile:
> break
> moresprocessing( )
Thanks - to you and Tim - score 1 for self-documenting code!
--
Steve Horne
steve at ninereeds dot fsnet dot co dot uk
More information about the Python-list
mailing list