RE: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread wesley
Hi exit (http://docs.python.org/2/library/constants.html#exit; rel="noreferrer) is an alias for quit (or vice-versa). They exist together simply to make Python more user-friendly. please refer:

Re: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Eryk Sun
On 9/16/19, Hongyi Zhao wrote: > > What is the Difference Between quit() and exit() commands in Python? They're different instances of the Quitter class, which is available if site.py is imported (i.e. not with the -S command-line option). They're created by site.setquit(): def setquit():

Re: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Peter Otten
Hongyi Zhao wrote: > What is the Difference Between quit() and exit() commands in Python? They are instances of the same type >>> import inspect >>> type(quit) is type(exit) True >>> print(inspect.getsource(type(quit))) class Quitter(object): def __init__(self, name, eof): self.name