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-July/148773.html below:

[Python-Dev] for...else

[Python-Dev] for...else [Python-Dev] for...elseMRAB python at mrabarnett.plus.com
Thu Jul 27 15:19:08 EDT 2017
On 2017-07-27 03:34, Mike Miller wrote:
> 
> 
> On 2017-07-26 16:36, MRAB wrote:
>> "nobreak" would introduce a new keyword, but "not break" wouldn't.
> 
> Whenever I've used the for-else, I've put a # no-break right next to it, to
> remind myself as much as anyone else.
> 
> for...: not break: is the best alternative I've yet seen, congrats.  Perhaps in
> Python 5 it can be enabled, with for-else: used instead for empty iterables, as
> that's what I expected the first few dozen times.
> 
For empty iterables, how about "elif None:"? :-)
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