[issue28876] bool of large range raises OverflowError

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e46fb8611867fa3b407a813f53137929b7cb4a10 by Serhiy Storchaka (4kir4) in branch 'master': bpo-28876: bool of large range raises OverflowError (#699) https://github.com/python/cpython/commit/e46fb8611867fa3b407a813f53137929b7cb4a10 -- _

[issue28876] bool of large range raises OverflowError

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6fad4090ec9a27f8572bb00661b9890f01fb62f7 by Serhiy Storchaka in branch '3.6': bpo-28876: bool of large range raises OverflowError (#699) (#734) https://github.com/python/cpython/commit/6fad4090ec9a27f8572bb00661b9890f01fb62f7 -- _

[issue28876] bool of large range raises OverflowError

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4276068fe57e93b4c8d428f0b1cde8ca04b8fb99 by Serhiy Storchaka in branch '3.5': bpo-28876: bool of large range raises OverflowError (#699) (#735) https://github.com/python/cpython/commit/4276068fe57e93b4c8d428f0b1cde8ca04b8fb99 -- _

[issue28876] bool of large range raises OverflowError

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Akira for your patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue28876] bool of large range raises OverflowError

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +649 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28876] bool of large range raises OverflowError

2017-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +648 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28876] bool of large range raises OverflowError

2017-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In issue29840 proposed an alternate and more general solution. But I think that nb_bool should be implemented for range objects since issue29840 is 3.7 only and nb_bool is faster. -- stage: needs patch -> patch review ___

[issue28876] bool of large range raises OverflowError

2017-03-17 Thread Akira Li
Akira Li added the comment: > Akira, could you open a pull request on GitHub? Done. PR 699 -- ___ Python tracker ___ ___ Python-bugs-

[issue28876] bool of large range raises OverflowError

2017-03-17 Thread Akira Li
Changes by Akira Li <4kir4...@gmail.com>: -- pull_requests: +572 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28876] bool of large range raises OverflowError

2017-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Akira, could you open a pull request on GitHub? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue28876] bool of large range raises OverflowError

2017-01-23 Thread Mark Dickinson
Mark Dickinson added the comment: Latest patch LGTM too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue28876] bool of large range raises OverflowError

2017-01-23 Thread Akira Li
Akira Li added the comment: I've updated the patch to use 4-space indent (pep-7). I've added space around "=" (pep-7); unlike the usual "dict(designator=value)" -- no space around "=" for keyword argument (pep-8). -- Added file: http://bugs.python.org/file46391/range_bool-c99-designate

[issue28876] bool of large range raises OverflowError

2017-01-22 Thread INADA Naoki
INADA Naoki added the comment: LGTM, except 2-space indent. -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28876] bool of large range raises OverflowError

2017-01-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This patch looks ready to go. I'll wait a bit to see it there are any other comments. If not, I'll apply it shortly. -- assignee: -> rhettinger ___ Python tracker __

[issue28876] bool of large range raises OverflowError

2017-01-22 Thread Akira Li
Akira Li added the comment: Following the python-dev discussion [1] I've added a variant of the patch that uses c99 designated initializers [2] [1] https://mail.python.org/pipermail/python-dev/2017-January/147175.html [2] https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html -- Adde

[issue28876] bool of large range raises OverflowError

2016-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: Patch LGTM. You could safely drop the initialisers beyond `nb_bool` in the `range_as_number` struct (per C99 6.7.8p21), but it's fine as it is. -- ___ Python tracker _

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Akira Li
Akira Li added the comment: I've removed the documentation changes from the patch. -- Added file: http://bugs.python.org/file45773/range_bool-no_docs.patch ___ Python tracker ___

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Mark Dickinson
Mark Dickinson added the comment: > I'm not sure how it should be documented. I think a change at this level probably isn't worth documenting in the official docs; it's enough that there's a Misc/NEWS entry for it. -- ___ Python tracker

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Akira Li
Akira Li added the comment: Here's a patch with range_bool() implementation, tests and the docs update. I'm not sure how it should be documented. I've specified it as versionchanged:: 3.6 -- keywords: +patch nosy: +akira Added file: http://bugs.python.org/file45765/range_bool.patch __

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for implementing nb_bool for range objects. -- nosy: +rhettinger ___ Python tracker ___ ___ Py

[issue28876] bool of large range raises OverflowError

2016-12-05 Thread Mark Dickinson
New submission from Mark Dickinson: The bool of a large range raises OverflowError: >>> bool(range(2**63)) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t This is a side-effect of len raising OverflowError, wh