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 jdemeyer
Recipients jdemeyer, ncoghlan, rhettinger
Date 2018-06-22.13:41:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529674861.11.0.56676864532.issue33939@psf.upfronthosting.co.za>
In-reply-to
Content
I'm certainly in favor of adding a way for infinite iterators to state that they are infinite. I just feel like TypeError is way overused in Python. I also disagree that it's a category error: it's an iterable, so it does make sense to ask for its length.

You should also consider that there may be classes of iterables whose instances are sometimes finite and sometimes infinite. Then it's certainly not a category error.

So I would like a specific answer for "I'm infinite". If you don't like OverflowError, other options are ArithmeticError, IndexError, ValueError or simply returning math.inf
History
Date User Action Args
2018-06-22 13:41:01jdemeyersetrecipients: + jdemeyer, rhettinger, ncoghlan
2018-06-22 13:41:01jdemeyersetmessageid: <1529674861.11.0.56676864532.issue33939@psf.upfronthosting.co.za>
2018-06-22 13:41:01jdemeyerlinkissue33939 messages
2018-06-22 13:41:01jdemeyercreate