>for action in repeat(f, n): action() >I don't know how 'Pythonic' this would be...
agree, or this: import itertools def f1(): print "hello" [f() for f in itertools.repeat(f1,6)] tpt -- http://mail.python.org/mailman/listinfo/python-list
>for action in repeat(f, n): action() >I don't know how 'Pythonic' this would be...
agree, or this: import itertools def f1(): print "hello" [f() for f in itertools.repeat(f1,6)] tpt -- http://mail.python.org/mailman/listinfo/python-list