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/2005-June/054170.html below:

[Python-Dev] Wishlist: dowhile

[Python-Dev] Wishlist: dowhile [Python-Dev] Wishlist: dowhileNick Coghlan ncoghlan at gmail.com
Mon Jun 13 04:39:11 CEST 2005
Raymond Hettinger wrote:
> More than case-statement semantics or PEP343, I wish for a dowhile
> statement.
> 
> The most straight-forward way is to put the conditional expression at
> the beginning of the block with the understanding that a dowhile keyword
> will evaluate the condition only after the block runs

Out-of-order code execution rarely counts as 'straightforward' ;)

With PEP 315, a do-while loop would look like:

   do:
       <body>
   while <cond>:
       pass

But then, I'm reasonably happy with the 'break out of an infinite 
loop' approach, so *shrug*.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com
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