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:
http://mail.
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:
http://mai
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
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 t
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, may
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).
On 3/7/06, Thomas Wouters <[EMAIL PROTECTED]> wrote:
> +1 from me. Only change I would make is pass an argument to
> SystemExit() such as "%s() called", although the chances of this
> exception being caught is very slim.
>
>
> Raising SystemExit("quit() called") has an additional benefit (although
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, thou
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
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 a bad sid
Jim Jewett wrote:
> 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
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
= name> def __repr__(self):> return 'Use %s() to exit' % self.name> def __call__(self):> rais
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 ev
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: ...
>>
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.
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:
http://m
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 i
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 th
18 matches
Mail list logo