◐ Shell
clean mode source ↗

bpo-37812: Expand confusing CHECK_SMALL_INT so return is explicit. by gnprice · Pull Request #15216 · python/cpython

It's not obvious when looking at a call site of this macro that it
affects the control flow.  Move the `return` into the callers so
it's explicit there, and factor out the fiddly bit as IS_SMALL_INT.

As a bonus, a couple of other spots can also use IS_SMALL_INT with a
benefit to clarity.

benjaminp

rhettinger

@gnprice gnprice deleted the pr-smallint-explicit-return branch

August 24, 2019 22:37

lisroach pushed a commit to lisroach/cpython that referenced this pull request

Sep 10, 2019

DinoV pushed a commit to DinoV/cpython that referenced this pull request

Jan 14, 2020

websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request

Jul 20, 2020