[cvs] / pirate / test / python / microthreads.py Repository:
ViewVC logotype

View of /pirate/test/python/microthreads.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Fri Oct 8 12:11:51 2004 UTC (5 years, 11 months ago) by rubys
Branch: MAIN
CVS Tags: HEAD
Refactor each test case into a separate file, when possible
from __future__ import generators #@TODO: 2.3
def make_repeater(s):
    def repeat():
	while 1:
	    yield s
    return repeat()
a = make_repeater('a')
b = make_repeater('b')
for x in [1,2,3,4]:
    print a.next(),
    print b.next(),

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.5