This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients bbayles, erik.bray, jdemeyer, ncoghlan, rhettinger, serhiy.storchaka
Date 2018-06-23.07:30:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
See also a meta-issue issue29833.

If use OverflowError as a sign of infinite iterator in __length_hint__, this should be documented as a legitimate use case for OverflowError.

itertools.repeat.__length_hint__() and reversed.__length_hint__() currently raise a TypeError for infinite iterator. reversed.__length_hint__() returns NotImplemented (which raises a TypeError when convert to a C integer). Both TypeError and NotImplemented are handled by the consumer of __length_hint__: in PyObject_LengthHint(). An OverflowError is treated as error.
Date User Action Args
2018-06-23 07:30:30serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, ncoghlan, erik.bray, jdemeyer, bbayles
2018-06-23 07:30:30serhiy.storchakasetmessageid: <>
2018-06-23 07:30:30serhiy.storchakalinkissue33939 messages
2018-06-23 07:30:30serhiy.storchakacreate