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

py.user report at bugs.python.org
Thu Jun 27 07:01:01 CEST 2013


New submission from py.user:

http://docs.python.org/3/library/itertools.html#itertools-recipes
"def repeatfunc(func, times=None, *args):"

>>> repeatfunc(lambda x: x, times=None, 1)
  File "<stdin>", line 1
SyntaxError: non-keyword arg after keyword arg
>>>
>>> repeatfunc(lambda x: x, 1, times=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: repeatfunc() got multiple values for argument 'times'
>>>

----------
assignee: docs at python
components: Documentation
messages: 191930
nosy: docs at python, py.user
priority: normal
severity: normal
status: open
title: In itertools recipes repeatfunc() defines a non-keyword argument as keyword
type: enhancement
versions: Python 3.3, Python 3.4

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


More information about the docs mailing list