Message198849
>>> 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. |
|
Date |
User |
Action |
Args |
2013-10-02 15:23:16 | vajrasky | set | recipients:
+ vajrasky |
2013-10-02 15:23:16 | vajrasky | set | messageid: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> |
2013-10-02 15:23:16 | vajrasky | link | issue19145 messages |
2013-10-02 15:23:16 | vajrasky | create | |
|