Since Python 3.2, Computed gotos are enabled by default: documentation
Computed gotos are now enabled by default on supported compilers (which are detected by the configure script). They can still be disabled selectively by specifying
--without-computed-gotos
.
However on Mac, installed Python does not have computed gotos enabled.
# Tested on macOS 10.15.3, with pyenv installed Python 3.7, 3.8
import sysconfig
sysconfig.get_config_var('USE_COMPUTED_GOTOS') # outputs: 0
sysconfig.get_config_var('HAVE_COMPUTED_GOTOS') # outputs: 1
I'm guessing it's because the compiler used (Clang by default) doesn't support this feature. Is there anyway to get around it?
Update: I created bpo-40790 for this issue.