I really like your proposal.
I know about itertools.count
, but find it confusing and quite cumbersome to import just for that.
I don’t think there are any real disadvantages:
- performance. Very unlikely to be significant
-
implementation of len. Just a
NotImplemented
exception could be raised -
duplicate functionality There are so many cases of that in Python, that it can’t be a serious problem. Please don’t deprecate
itertools.count