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/2007-December/075627.html below:

[Python-Dev] PEP Idea: Syntactic sugar for StopIteration.

[Python-Dev] PEP Idea: Syntactic sugar for StopIteration. [Python-Dev] PEP Idea: Syntactic sugar for StopIteration.Raymond Hettinger python at rcn.com
Sat Dec 8 20:17:28 CET 2007
> Note that 'yield break' resembles the 'break' statement used in loops,
> while 'StopIteration' doesn't. 'yield break' is more orthogonal to the
> rest of the language.
>
> I am looking forward to seeing your opinions.

-1

I do not find the meaning to be transparent and the proposal adds new syntax without adding functionality.

Also, I do not find the "emtpy generator" use case to be even slightly motivating.  If an empty iterator were needed for some 
reason, I would just write: iter([]) and be done with it.


Raymond 
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