n.org (mailto:python-list@python.org)
Betreff: What is the Difference Between quit() and exit() commands in Python?
What is the Difference Between quit() and exit() commands in Python?
--
mail.python.org/mailman/listinfo/python-list
(https://mail.python.org/mailman/listinfo/python-list; target=&q
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():
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
What is the Difference Between quit() and exit() commands in Python?
--
https://mail.python.org/mailman/listinfo/python-list