On Wed, May 26, 2021 at 4:21 PM Grant Edwards <grant.b.edwa...@gmail.com> wrote: > > On 2021-05-25, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > > >>Oh ok, it seemed to be fine. Would it be the right way to do it with > >>sys.exit()? Having to import another library just to end a program > >>might not be ideal. > > > > I've never had to use sys. for exit... > > I would have sworn you used to have to import sys to use exit(). Am I > misremembering? > > Apparently exit() and sys.exit() aren't the same, so what is the > difference between the builtin exit and sys.exit? >
exit() is designed to be used interactively, so, among other things, it also has a helpful repr: >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit ChrisA -- https://mail.python.org/mailman/listinfo/python-list