[Python-Dev] Wishlist: dowhile
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jun 14 04:20:26 CEST 2005
Phillip J. Eby wrote:
> By the way, whatever happened to "and while"? i.e.:
>
> while True:
> data = inp.read(blocksize)
> and while data:
> out.write(data)
My favourite version of this is
while:
data = inp.read(blocksize)
gives data:
out.write(data)
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list