Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #110803

Re: "for/while ... break(by any means) ... else" make sense?

From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: "for/while ... break(by any means) ... else" make sense?
Date 2016-06-30 00:00 -0400
Message-ID <mailman.118.1467259216.2358.python-list@python.org> (permalink)
References (2 earlier) <57746765$0$1593$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqAmesf58J9bYa7_vWXTtjnFU7JrkGy5hoqFNC3tTx-8Q@mail.gmail.com> <mailman.116.1467250108.2358.python-list@python.org> <b014e209-b2a6-4921-9e22-8473f7e50e21@googlegroups.com> <1467259214.2526352.652676097.71C0BE44@webmail.messagingengine.com>

Show all headers | View raw


On Wed, Jun 29, 2016, at 22:26, Rustom Mody wrote:
> > os.kill(os.getpid(), 9)
> >
> > Now THAT is the hardest way to abort. You ain't comin' back from
> > this one!
>
> Is it?
>
> | On Windows, signal() can only be called with SIGABRT, SIGFPE,
> | SIGILL, SIGINT, SIGSEGV, or SIGTERM. A ValueError will be raised in
> | any other case.

And SIGBREAK (it being missing from this list is a doc bug).

> from https://docs.python.org/3.5/library/signal.html
>
> 9 may still work?? Dunno...

That's signal, not kill. You can call kill on Windows with any
integer. Only CTRL_C_EVENT and CTRL_BREAK_EVENT (which aren't, AIUI,
equal to SIGINT and SIGBREAK, which is unfortunate for cross-platform
code) do anything interesting, the rest call TerminateProcess with the
given value.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: "for/while ... break(by any means) ... else" make sense? Victor Savu <victor.nicolae.savu@gmail.com> - 2016-06-29 10:01 +0000
  Re: "for/while ... break(by any means) ... else" make sense? Steven D'Aprano <steve@pearwood.info> - 2016-06-30 10:27 +1000
    Re: "for/while ... break(by any means) ... else" make sense? Chris Angelico <rosuav@gmail.com> - 2016-06-30 11:28 +1000
      Re: "for/while ... break(by any means) ... else" make sense? Rustom Mody <rustompmody@gmail.com> - 2016-06-29 19:26 -0700
        Re: "for/while ... break(by any means) ... else" make sense? Random832 <random832@fastmail.com> - 2016-06-30 00:00 -0400
      Re: "for/while ... break(by any means) ... else" make sense? Steven D'Aprano <steve@pearwood.info> - 2016-06-30 14:12 +1000
        Re: "for/while ... break(by any means) ... else" make sense? Chris Angelico <rosuav@gmail.com> - 2016-06-30 14:40 +1000
        Re: "for/while ... break(by any means) ... else" make sense? Zachary Ware <zachary.ware+pylist@gmail.com> - 2016-06-29 23:47 -0500
        Re: "for/while ... break(by any means) ... else" make sense? Random832 <random832@fastmail.com> - 2016-06-30 00:59 -0400

csiph-web