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/2017-September/149174.html below:

[Python-Dev] PEP 548: More Flexible Loop Control

[Python-Dev] PEP 548: More Flexible Loop Control [Python-Dev] PEP 548: More Flexible Loop ControlR. David Murray rdmurray at bitdance.com
Tue Sep 5 20:11:00 EDT 2017
I've written a PEP proposing a small enhancement to the Python loop
control statements.  Short version: here's what feels to me like a
Pythonic way to spell "repeat until":

    while:
        <do stuff>
        break if <done condition>

The PEP goes into some detail on why this feels like a readability
improvement in the more general case, with examples taken from
the standard library:

     https://www.python.org/dev/peps/pep-0548/

Unlike Larry, I don't have a prototype, and in fact if this idea
meets with approval I'll be looking for a volunteer to do the actual
implementation.

--David

PS: this came to me in a dream on Sunday night, and the more I explored
the idea the better I liked it.  I have no idea what I was dreaming about
that resulted in this being the thing left in my mind when I woke up :)
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