[Python-ideas] Expose `itertools.count.start` and implement `itertools.count.__eq__` based on it, like `range`.
Neil Girdhar
mistersheik at gmail.com
Sat Jun 7 03:59:38 CEST 2014
That would be great.
On Friday, May 16, 2014 12:16:52 AM UTC-4, Antony Lee wrote:
>
> Actually, a more reasonable solution would be to have range handle keyword
> arguments and map "range(start=x)" to "count(x)". Or, perhaps more simply,
> "range(x, None)" (so that no keyword arguments are needed).
>
>
> 2014-05-15 13:04 GMT-07:00 Ram Rachum <ram.r... at gmail.com <javascript:>>:
>
>> Now that I think about it, I would ideally want `itertools.count` to be
>> deprecated in favor of `range(float('inf'))`, but I know that would never
>> happen.
>>
>>
>> On Thursday, May 15, 2014 11:02:56 PM UTC+3, Ram Rachum wrote:
>>>
>>> I suggest exposing `itertools.count.start` and implementing
>>> `itertools.count.__eq__` based on it. This'll provide the same benefits
>>> that `range` got by exposing `range.start` and allowing `range.__eq__`.
>>>
>>
>> _______________________________________________
>> Python-ideas mailing list
>> Python... at python.org <javascript:>
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140606/6fae4ec6/attachment.html>
More information about the Python-ideas
mailing list