[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

Mark Lawrence report at bugs.python.org
Sat Jan 25 16:39:17 CET 2014


Mark Lawrence added the comment:

>From a user perspective the docs say this "itertools.repeat(object[, times]) - Make an iterator that returns object over and over again. Runs indefinitely unless the times argument is specified."  So to me the use of "Times=None" in the "equivalent to" section is simply a red herring, as the user often won't bother reading this and certainly won't see it from interactive help.  As for negative times values I'd say leave it as is, although it someone was to suggest deprecating this behaviour and raising a ValueError instead I'd have no objections.

----------

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


More information about the Python-bugs-list mailing list