I'm on Pycharm with python3. I can run the code by shift+control+R (short cut for run, equivalent to press the green triangle run button) Or run the code by shift+alt+E to load the code into Python console suggested by interactive shell debugging with pycharm
shift+control+R gives no errors.
shift+alt+E throws an exception:
TypeError: an integer is required (got type str)
The code I run as follows:
import sys
sys.exit('exist')
print('shouldnt print')
I want to understand what causes the different behavior and how I can avoid this. The code is inline with sys.exit
documentation for python3.