Message322010
| Author | chepner |
|---|---|
| Recipients | chepner |
| Date | 2018-07-20.14:11:03 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I expected to be able to pass None as an explicit count to itertools.repeat to get the default behavior of an infinite iterator:
>>> list(islice(repeat(1), 10))
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
>>> list(islice(repeat(1, None), 10))
Traceback (most recent call last):
File "<stdin>", line 1 in <module>
TypeError: 'NoneType' object cannot be interpreted as an integer |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-07-20 14:11:03 | chepner | set | recipients: + chepner |
| 2018-07-20 14:11:03 | chepner | set | messageid: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> |
| 2018-07-20 14:11:03 | chepner | link | issue34169 messages |
| 2018-07-20 14:11:03 | chepner | create | |