stdlib: Add quit and exit by aisk · Pull Request #254 · go-python/gpython
Repository navigation
stdlib: Add quit and exit - #254
Merged
sbinet merged 1 commit into go-python:main from aisk:exit-quit Mar 2, 2026
Merged
stdlib: Add quit and exit #254 sbinet merged 1 commit into go-python:main from aisk:exit-quit
Conversation
aisk commented Feb 28, 2026 · edited Loading
Copy link Copy Markdown
Contributor
Add quit and exit.
In CPython's REPL, there are other ways to quit or exit the REPL without calling a function (by simply typing quit or exit). These names are injected via site.py. Since GPython does not have a site.py, this REPL usage is not implemented
Close : #140
stdlib: Add quit and exit
0876a48
sbinet
approved these changes
Mar 2, 2026
View reviewed changes
sbinet left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
LGTM
FYI, we have a little discrepancy w/ CPython (3.14) here:
$> python >>> exit(False) $> echo $? 0 $> python >>> exit(True) $> echo $? 1
compared to:
$> gpython >>> exit(False) False $> echo $? 1 $> gpython >>> exit(True) True $> echo $? 1
(note the extraneous printouts and the different exit codes.)
sbinet merged commit444ae5e
into
go-python : main
Mar 2, 2026
6 checks passed
aisk
deleted the
exit-quit
branch
March 2, 2026 13:05
aisk commented Mar 2, 2026
Copy link Copy Markdown
Contributor
Author
|
In CPython, bool type implemented the
|
aisk commented Mar 2, 2026
Copy link Copy Markdown
Contributor
Author
This is not correct, after #255 , the behavior is still not exactly like CPython 🥲 |