Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
24cb053b
Commit
24cb053b
authored
Mar 09, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1446372: quit and exit can now be called from the interactive
interpreter to exit.
parent
ca4d08b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
Lib/site.py
Lib/site.py
+13
-4
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/site.py
View file @
24cb053b
...
...
@@ -227,12 +227,21 @@ def setquit():
"""
if
os
.
sep
==
':'
:
e
xit
=
'Use Cmd-Q to quit.
'
e
of
=
'Cmd-Q
'
elif
os
.
sep
==
'
\
\
'
:
e
xit
=
'Use Ctrl-Z plus Return to exit.
'
e
of
=
'Ctrl-Z plus Return
'
else
:
exit
=
'Use Ctrl-D (i.e. EOF) to exit.'
__builtin__
.
quit
=
__builtin__
.
exit
=
exit
eof
=
'Ctrl-D (i.e. EOF)'
class
Quitter
(
object
):
def
__init__
(
self
,
name
):
self
.
name
=
name
def
__repr__
(
self
):
return
'Use %s() or %s to exit'
%
(
self
.
name
,
eof
)
def
__call__
(
self
,
code
=
None
):
raise
SystemExit
(
code
)
__builtin__
.
quit
=
Quitter
(
'quit'
)
__builtin__
.
exit
=
Quitter
(
'exit'
)
class
_Printer
(
object
):
...
...
Misc/NEWS
View file @
24cb053b
...
...
@@ -12,6 +12,9 @@ What's New in Python 2.5 alpha 1?
Core and builtins
-----------------
- Patch #1446372: quit and exit can now be called from the interactive
interpreter to exit.
- Patch #1434038: property() now uses the getter'
s
docstring
if
there
is
no
"doc"
argument
given
.
This
makes
it
possible
to
legitimately
use
property
()
as
a
decorator
to
produce
a
read
-
only
property
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment