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/2001-March/013761.html below:

[Python-Dev] Simple generators, round 2

[Python-Dev] Simple generators, round 2Tim Peters tim_one@email.msn.com
Tue, 20 Mar 2001 01:31:49 -0500
[Neil Schemenauer]
> I like the frame methods.  However, this may be a good idea since
> Jython may implement things quite differently.

Note that the "compare fringes of two trees" example is a classic not because
it's inherently interesting, but because it distills the essence of a
particular *class* of problem (that's why it's popular with academics).

In Icon you need to create co-expressions to solve this problem, because its
generators aren't explicitly resumable, and Icon has no way to spell "kick a
pair of generators in lockstep".  But explicitly resumable generators are in
fact "good enough" for this classic example, which is usually used to
motivate coroutines.

I expect this relates to the XLST/XSLT/whatever-the-heck-it-was example:  if
Paul thought iterators were the bee's knees there, I *bet* in glorious
ignorance that iterators implemented via Icon-style generators would be the
bee's pajamas.

Of course Christian is right that you have to prevent a suspended frame from
getting activated more than once simultaneously; but that's detectable, and
should be considered a programmer error if it happens.




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