[docs] [issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

Ezio Melotti report at bugs.python.org
Thu Aug 8 15:10:24 CEST 2013


Ezio Melotti added the comment:

> it should be: "def repeatfunc(func, times, *args):"
> and None for times described in the docstring

This would require you to provide at least two elements, whereas now it's possible to pass just the function (e.g. repeatfunc(random.random)).

The problem with the current signature is that you are "forced" to specify the "times" (positionally) whenever you want to pass args to the function -- even if you want an endless repetition (i.e. times=None).

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18313>
_______________________________________


More information about the docs mailing list