Antoon Pardon <[EMAIL PROTECTED]> writes: > repeat(object[, times]) > Make an iterator that returns object over and over again. Runs > indefinitely unless the times argument is specified. ... > > My first impression from this, is that it is possible to call > this as follows: > repeat(None, times = 5) > But that doesn't work either.
The code and/or doc is wrong, you have to use a positional arg and not a named one. repeat(None, 5) does the right thing. > That wont help much if you would like something like the following: > > def fun(f): > > arg = Default > try: > arg = Try_Processing() > except Nothing_To_Process: > pass > f(arg) Write it like this: def fun(f): args = () try: args = (Try_Processing(),) except Nothing_To_Process: pass f(*args) -- http://mail.python.org/mailman/listinfo/python-list