A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-March/013931.html below:

[Python-Dev] Simple generators, round 2

[Python-Dev] Simple generators, round 2Neil Schemenauer nas@arctrix.com
Sat, 24 Mar 2001 21:47:48 -0800
On Sun, Mar 25, 2001 at 12:07:20AM -0500, Tim Peters wrote:
> If you give me a coroutine program, and let me add a "control
> loop", ...

This is exactly what I started doing when I was trying to rewrite
your Coroutine.py module to use generators.

> A. Simple to implement in CPython without threads, and at least
>    possible likewise even for Jython.

I'm not sure about Jython.  The sys._getframe(), frame.suspend(),
and frame.resume() low level interface is nice.  I think Jython
must know which frames are going to be suspended at compile time.
That makes it hard to build higher level control abstractions.  I
don't know much about Jython though so maybe there's another way.
In any case it should be possible to use threads to implement
some common higher level interfaces.

  Neil



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