[Python-Dev] [Python-ideas] Expose itertools.count.start and implement itertools.count.__eq__ based on it, like range. (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Sat Jun 7 11:50:50 CEST 2014


On 7 June 2014 19:36, Ram Rachum <ram.rachum at gmail.com> wrote:

My need is to have an infinite immutable sequence. I did this for myself by creating a simple count-like stateless class, but it would be nice if that behavior was part of range.

Handling esoteric use cases like it sounds yours was is why user defined classes exist. It does not follow that "I had to write a custom class to solve my problem" should lead to a standard library or builtin changing unless you can make a compelling case for:

Cheers, Nick.

-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia



More information about the Python-Dev mailing list