function while true - list function?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Jul 24 12:22:44 EDT 2001


Tue, 24 Jul 2001 15:48:52 GMT, Nick Perkins <nperkins7 at home.com> pisze:

> Here's another way to do it, using generators:
> (in python 2.2)

And here is another (Python 2.2):

def gen_unroll(fn, *args, **kwds):
    return iter(lambda: fn(*args, **kwds), None)

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list