Closed as not planned
Closed as not planned
Description
Bug report
Bug description:
Setting a string to start
and step
argument of itertools.count() gets the error message as shown below:
from itertools import count
print(count(start='Hello')) # Error
print(count(step='World')) # Error
TypeError: a number is required
But setting a boolean value to start
and step
argument works as shown below:
from itertools import count
print(count(start=True)) # count(1)
print(count(step=False)) # count(0, False)
So, the error message should be the same as the one of range() as shown below:
print(range('Hello')) # Error
TypeError: 'str' object cannot be interpreted as an integer
CPython versions tested on:
3.13
Operating systems tested on:
Windows