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 mark.dickinson
Recipients mark.dickinson
Date 2016-12-05.09:37:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za>
In-reply-to
Content
The bool of a large range raises OverflowError:

    >>> bool(range(2**63))
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OverflowError: Python int too large to convert to C ssize_t

This is a side-effect of len raising OverflowError, which is a general problem that's nontrivial to fix (the sq_length slot is constrained to return a ssize_t). In theory, though, it would be possible to implement nb_bool for range objects to do the right thing.

In practice, this may well not be worth fixing, though I think it's at least worth reporting.
History
Date User Action Args
2016-12-05 09:37:42mark.dickinsonsetrecipients: + mark.dickinson
2016-12-05 09:37:42mark.dickinsonsetmessageid: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za>
2016-12-05 09:37:42mark.dickinsonlinkissue28876 messages
2016-12-05 09:37:41mark.dickinsoncreate