Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: "for/while ... break(by any means) ... else" make sense? Date: Thu, 30 Jun 2016 00:00:14 -0400 Lines: 23 Message-ID: References: <57746765$0$1593$c3e8da3$5496439d@news.astraweb.com> <1467259214.2526352.652676097.71C0BE44@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de B2rZslP0Z/T/+5n6C8NAKAeYWv2n2OXnPpr3CuHSdWug== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; "ain't": 0.09; 'received:internal': 0.09; 'subject:while': 0.09; 'valueerror': 0.09; 'wed,': 0.15; 'value.': 0.15; 'bug).': 0.16; 'integer.': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:break': 0.16; 'subject:make': 0.16; 'wrote:': 0.16; 'case.': 0.18; 'windows': 0.20; 'doc': 0.22; 'header:In-Reply- To:1': 0.24; '(which': 0.26; 'rest': 0.26; '(it': 0.29; 'windows,': 0.29; 'subject:/': 0.30; 'url:python': 0.33; 'raised': 0.33; 'equal': 0.34; 'list': 0.34; 'url:org': 0.36; 'subject:" ': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'received:10': 0.37; 'being': 0.37; 'missing': 0.37; 'received:66': 0.38; 'anything': 0.38; 'skip:o 20': 0.38; 'to:addr:python.org': 0.40; 'still': 0.40; 'called': 0.40; 'url:3': 0.60; 'header:Message-Id:1': 0.61; 'back': 0.62; 'subject:any': 0.84; 'subject:else': 0.84; 'subject:sense': 0.84; 'hardest': 0.91; 'interesting,': 0.93 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=AevcId0EZR5thBC/hcvcRDjrpGE=; b=UhTiY0 b9sUKuo2SjJfyigsT1vq8+4hCo+YGc+6B57kX3AZ0j4X9o/si2vV/Og1Gxf6FloR 2jlyuHhgNfqVXudKM4m98RLvMHj/xo918+HUXFvQWLH1hY05ER1IhyOt9xPR1ff9 wtNRa79q+wNTH90uJVSoLMbwkkmHedBcyqyv8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=AevcId0EZR5thBC /hcvcRDjrpGE=; b=BHX2zPJ/KCMfa5zQcHVnjpxyEVUpQ3fh30DnlwjiZuC7hqt xOJxt7lDDEOrKiiJpSLcqkkA7zsEskwwWCNVzb8TzmS8gVjNFlr8HXC2L82+tAr3 IonR2dZIm6exvfZtmxE0iVoqC9si5At5KG3f2vXxKeJoBDN1J1wuVBIvMu/o= X-Sasl-Enc: uHUPFFwFxnBNNjInaNZ/pSEdSsZpR3DtxF9InXxcPI2D 1467259214 X-Mailer: MessagingEngine.com Webmail Interface - ajax-03c7c087 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1467259214.2526352.652676097.71C0BE44@webmail.messagingengine.com> X-Mailman-Original-References: <57746765$0$1593$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:110803 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.