Guido van Rossum wrote:
We seem to have a consensus. Is anybody working on a patch yet?
http://python.org/sf/1446372
Georg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
Oleg Broytmann wrote:
On Wed, Mar 08, 2006 at 12:37:47AM +0100, Thomas Wouters wrote:
Raising SystemExit(quit() called) has an additional benefit (although the
wording could use some work):
raise SystemExit(quit() called)
quit() called
(At least, I consider that a benefit :-)
It has
On Wed, Mar 08, 2006 at 12:39:51PM +, Steve Holden wrote:
Oleg Broytmann wrote:
raise SystemExit(quit() called)
quit() called
Error!
I should imagine the use cases for running an interactive Python shell
as a part of a script are fairly few and far between, though.
IDEs.
Guido van Rossum [EMAIL PROTECTED] wrote:
Bad idea, as several pointed out -- quit() should return a 0 exit
to the shell.
I like the idea of making quit callable. One small concern I have
is that people will use it in scripts to exit (rather than one of
the other existing ways to exit). OTOH,
Neil Schemenauer wrote:
Bad idea, as several pointed out -- quit() should return a 0 exit
to the shell.
I like the idea of making quit callable. One small concern I have
is that people will use it in scripts to exit (rather than one of
the other existing ways to exit). OTOH, maybe that's
Ian Bicking [EMAIL PROTECTED] wrote:
Neil Schemenauer wrote:
Bad idea, as several pointed out -- quit() should return a 0 exit
to the shell.
I like the idea of making quit callable. One small concern I have
is that people will use it in scripts to exit (rather than one of
the
Oleg Broytmann wrote:
IDEs. Edit a code in an editor, run python -i script.py, investigate the
environment, return to the editor, get error message.
An IDE is likely to want to catch SystemExits in the
debugged script and handle them specially anyway.
--
Greg Ewing, Computer Science Dept,
We seem to have a consensus. Is anybody working on a patch yet?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
Frederick suggested a change to quit/exit a while ago, so it wasn't just
a string with slight instructional purpose, but actually useful. The
discussion was surprisingly involved, despite the change really trully
not being that big. And everyone drifted off, too tired from the
discussion to
Works for me.
On 3/7/06, Ian Bicking [EMAIL PROTECTED] wrote:
Frederick suggested a change to quit/exit a while ago, so it wasn't just
a string with slight instructional purpose, but actually useful. The
discussion was surprisingly involved, despite the change really trully
not being that
Ian Bicking wrote:
class Quitter(object):
def __init__(self, name):
self.name = name
def __repr__(self):
return 'Use %s() to exit' % self.name
def __call__(self):
raise SystemExit()
quit = Quitter('quit')
exit = Quitter('exit')
This is not very
do {
cmd = readline()
do_stuff_with_cmd(cmd);
} while (!strcmp(cmd, quit));
printf(Bye!);
exit(0);
KISS?
--
mvh Björn
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
I am probably the biggest proponent of magic variables, but this just
won't work.
First, commands and lines are not the same thing, so:
print \
exit
breaks your propossal.
Second, quit and exit are bindable variables, and you need to be sure
that they still mean _quit_, and not something else.
BJörn Lindqvist wrote:
do {
cmd = readline()
do_stuff_with_cmd(cmd);
} while (!strcmp(cmd, quit));
printf(Bye!);
exit(0);
KISS?
I believe there were concerns that rebinding quit would cause strange
behavior. E.g.:
quit = False
while not quit: ...
quit
$
Or:
On 3/7/06, Ian Bicking [EMAIL PROTECTED] wrote:
Frederick suggested a change to quit/exit a while ago, so it wasn't just
a string with slight instructional purpose, but actually useful. The
discussion was surprisingly involved, despite the change really trully
not being that big. And
On 3/8/06, Brett Cannon [EMAIL PROTECTED] wrote:
On 3/7/06, Ian Bicking [EMAIL PROTECTED] wrote: class Quitter(object):def __init__(self, name):self.name
= namedef __repr__(self):return 'Use %s() to exit' % self.namedef __call__(self):raise SystemExit() quit = Quitter('quit')
exit =
Ian reproposed:
class Quitter(object):
def __init__(self, name):
self.name = name
def __repr__(self):
return 'Use %s() to exit' % self.name
def __call__(self):
raise SystemExit()
The one change I would suggest is the string
17 matches
Mail list logo