A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-October/069150.html below:

[Python-Dev] PEP 315 - do while

[Python-Dev] PEP 315 - do while [Python-Dev] PEP 315 - do whileNick Coghlan ncoghlan at gmail.com
Tue Oct 3 11:34:03 CEST 2006
Hans Polak wrote:
> Ok, I see your point. Really, I've read more about Python than worked with
> it, so I'm out of my league here.
> 
> Can I combine your suggestion with mine and come up with the following:
> 
>       do:
>           <setup code>
>           <loop body>
>           while <condition>
>       else:
>           <loop completion code>

In my example, the 3 sections (<setup code>, <loop body> and <loop completion 
code> are all optional. A basic do-while loop would look like this:

       do:
           <setup code>
           while <condition>

(That is, <setup code> is still repeated each time around the loop - it's 
called that because it is run before the loop evaluated condition is evaluated)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4