Message198849
| 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: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 |
|