K
Kay Schluehr
Originally I came up with the idea of a pure Python implementation for
copyable generators as an ActiveState Python Cookbook recipe. Too bad,
it was badly broken as Klaus Müller from the SimPy project pointed
out. Two weeks and lots of tests later I got finally a running version
that works not only in the very most simple use cases. As the code
size increased it turned out to not really fit anymore into the
"recipe" category and I created a package called "generator_tools".
generator_tools-0.1 is available for both Python 2.5 and Python 3.0
(!)
The generator_tools package can be downloaded from PyPI
http://pypi.python.org/pypi/generator_tools/0.1
More information is presented on my project homepage
http://www.fiber-space.de
Documentation is also included in the distribution.
Usage:
----------
from generator_tools.copygenerators import*
from generator_tools.picklegenerators import*
def f(start):
i = start
while i<start+10:
yield i
i+=1
True
copyable generators as an ActiveState Python Cookbook recipe. Too bad,
it was badly broken as Klaus Müller from the SimPy project pointed
out. Two weeks and lots of tests later I got finally a running version
that works not only in the very most simple use cases. As the code
size increased it turned out to not really fit anymore into the
"recipe" category and I created a package called "generator_tools".
generator_tools-0.1 is available for both Python 2.5 and Python 3.0
(!)
The generator_tools package can be downloaded from PyPI
http://pypi.python.org/pypi/generator_tools/0.1
More information is presented on my project homepage
http://www.fiber-space.de
Documentation is also included in the distribution.
Usage:
----------
from generator_tools.copygenerators import*
from generator_tools.picklegenerators import*
def f(start):
i = start
while i<start+10:
yield i
i+=1
True