This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients vajrasky
Date 2013-10-02.15:23:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za>
In-reply-to
Content
>>> from itertools import repeat
>>> repeat(2, -10).__length_hint__()
0
>>> repeat(2, times=-10).__length_hint__()
18446744073709551606
>>> repeat(2, times=-10)
repeat(2, -10)
>>> repeat(2, -10)
repeat(2, 0)

Hereby, I attached two alternatives of patch to make the behaviour consistent.

The first one makes the negative number parameter/keyword ALWAYS means endless.
History
Date User Action Args
2013-10-02 15:23:16vajraskysetrecipients: + vajrasky
2013-10-02 15:23:16vajraskysetmessageid: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za>
2013-10-02 15:23:16vajraskylinkissue19145 messages
2013-10-02 15:23:16vajraskycreate