In [EMAIL PROTECTED], 雷 wrote:
suggest add do while loop in later version
Please also suggest a clean syntax for this. :-)
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
In [EMAIL PROTECTED], é· wrote:
suggest add do while loop in later version
Please also suggest a clean syntax for this. :-)
Since Python already has a while condition: loop, I'm supposing you
mean something
On Wed, 26 Apr 2006 22:41:04 +0200 in comp.lang.python, Marc
'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
In [EMAIL PROTECTED], ? wrote:
suggest add do while loop in later version
Please also suggest a clean syntax for this. :-)
while 1:
do_loop_stuff()
if time_to_leave(): break
My usual way of emulating do-while is:
started = False
while (someBoolean or not started):
started = True
#whatever else
This simply assures whatever else happens at least once. Is this
Pythonic?
THN
--
http://mail.python.org/mailman/listinfo/python-list
Rick ZantowIn any case, what would you want to do that you can't do
(in some way) now?
You can do all things already, that's not the point, I presume. Some
things added in the last years were already possibile in different
ways.
Rick ZantowIf you have a compelling use case,
I agree that such
suggest add do while loop in later version
--
http://mail.python.org/mailman/listinfo/python-list