This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: make site.py Quitter call itself on repr
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Ramchandra Apte, eric.araujo, underrun
Priority: normal Keywords: patch

Created on 2013-12-18 16:10 by underrun, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
quit_from_repr.patch underrun, 2013-12-18 16:10 review
Messages (3)
msg206537 - (view) Author: Derek Wilson (underrun) Date: 2013-12-18 16:10
calling exit() or quit() is actually very cumbersome especially as most other commandline tools that have a command interface allow you to exit or quit by typing exit or quit and not by calling a function.

if quitter's builtins are only available in the interactive interpreter this seems like it would be perfectly safe. now that we are looking at 3.x going forward, perhaps we can reopen this: http://bugs.python.org/issue8220
msg206541 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2013-12-18 17:00
-1 that would be weird behavior; typing a function name shouldn't run it. Python on the command line is still Python.
msg206544 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2013-12-18 17:39
Sorry, it is a deliberate choice to not have reprs have side-effects, espercially as important as quitting the interpreter.  The repr of quit/exit is used in places such as pydoc help; it would be bad to quit when the user wants to see documentation, for example.
History
Date User Action Args
2022-04-11 14:57:55adminsetgithub: 64215
2013-12-18 17:39:47eric.araujosetstatus: open -> closed

type: enhancement
components: + Library (Lib), - Extension Modules

nosy: + eric.araujo
messages: + msg206544
resolution: rejected
stage: resolved
2013-12-18 17:00:21Ramchandra Aptesetnosy: + Ramchandra Apte
messages: + msg206541
2013-12-18 16:10:15underruncreate