#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=0:smarttab
# 
# $Id$
#
"""
Test the unemerate() function with stackless Python.

"""

import sys

def enumerate(collection):
	'Generates an indexed series:  (0,coll[0]), (1,coll[1]) ...'
	i = 0
	it = iter(collection)
	while 1:
		yield (i, it.next())
		i += 1


for i, ii in enumerate(range(10)):
	print i, ii
