function while true - list function?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Jul 24 18:22:44 CEST 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