stdlib: Add quit and exit#254
Conversation
sbinet
left a comment
There was a problem hiding this comment.
LGTM
FYI, we have a little discrepancy w/ CPython (3.14) here:
$> python
>>> exit(False)
$> echo $?
0
$> python
>>> exit(True)
$> echo $?
1compared to:
$> gpython
>>> exit(False)
False
$> echo $?
1
$> gpython
>>> exit(True)
True
$> echo $?
1(note the extraneous printouts and the different exit codes.)
|
In CPython, bool type implemented the |
This is not correct, after #255, the behavior is still not exactly like CPython 🥲 |
Add quit and exit.
In CPython's REPL, there are other ways to
quitorexitthe REPL without calling a function (by simply typingquitorexit). These names are injected viasite.py. Since GPython does not have asite.py, this REPL usage is not implementedClose: #140