]> granicus.if.org Git - python/commit
bpo-29816: Shift operation now has less opportunity to raise OverflowError. (#680)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 30 Mar 2017 06:47:07 +0000 (09:47 +0300)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2017 06:47:07 +0000 (09:47 +0300)
commit918403cfc3304d27e80fb792357f40bb3ba69c4e
tree7c8a004d82a24b715b3c3b1f61a474d77c9ef0f7
parent762bf40438a572a398e500c74e38f9894ea20a45
bpo-29816: Shift operation now has less opportunity to raise OverflowError. (#680)

ValueError always is raised rather than OverflowError for negative counts.
Shifting zero with non-negative count always returns zero.
Lib/test/test_long.py
Misc/NEWS
Objects/longobject.c