diff --git a/Lib/_sitebuiltins.py b/Lib/_sitebuiltins.py --- a/Lib/_sitebuiltins.py +++ b/Lib/_sitebuiltins.py @@ -15,7 +15,7 @@ self.name = name self.eof = eof def __repr__(self): - return 'Use %s() or %s to exit' % (self.name, self.eof) + return self() def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. diff --git a/Lib/site.py b/Lib/site.py --- a/Lib/site.py +++ b/Lib/site.py @@ -338,8 +338,7 @@ def setquit(): """Define new builtins 'quit' and 'exit'. - These are objects which make the interpreter exit when called. - The repr of each object contains a hint at how it works. + These are objects which make the interpreter exit when called or repr'd. """ if os.sep == ':':