[issue20341] Argument Clinic: add "nullable ints"
Vajrasky Kok
report at bugs.python.org
Wed Jan 22 07:37:58 CET 2014
Vajrasky Kok added the comment:
>>> itertools.repeat.__doc__
'repeat(object, times=None)\nReturns an iterator which returns the object the specified number of times.\n\nIf times is None, returns the object endlessly.'
>>> itertools.repeat('a', times=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __new__() argument 2 must be (unspecified), not None
Also, maybe it's a good idea to add case for None and negative times in itertools.repeat unit test. You can get inspiration from http://bugs.python.org/issue19145
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20341>
_______________________________________
More information about the Python-bugs-list
mailing list