[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-18 Thread Ganesh Kathiresan
Ganesh Kathiresan added the comment: Hi All, thanks for the input. Yeah, the current behavior makes sense, if overflow exception is needed, we can use PyLong_AsLong. I guess my confusion was from the doc: > set *overflow to 1 or -1, respectively, and return -1; > Returns -1 on error. Use

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-18 Thread Mark Dickinson
Mark Dickinson added the comment: @ganesh3597. PyLong_AsLongAndOverflow is behaving as intended, and changes to the behaviour would break existing code. If you think there's a case for changing the behaviour, you'd need to provide your rationale for the change, details of what you propose

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-17 Thread Zackery Spytz
Zackery Spytz added the comment: > No, it should not. I agree. -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs-list

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : No, it should not. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-17 Thread Ganesh Kathiresan
Change by Ganesh Kathiresan : -- components: C API nosy: ganesh3597 priority: normal severity: normal status: open title: Should PyLong_AsLongAndOverflow raise exception on overflow? type: behavior versions: Python 3.10 ___ Python tracker