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

Steven D'Aprano steve at pearwood.info
Thu Jun 30 00:12:30 EDT 2016

On Thu, 30 Jun 2016 11:28 am, Chris Angelico wrote:

> On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano <steve at pearwood.info>
> wrote:
>> Following os.abort(), the interpreter exits in the hardest, quickest
>> manner possible.
> os.kill(os.getpid(), 9)
> Now THAT is the hardest way to abort. You ain't comin' back from this one!

The docs say it will abort in the hardest way possible, by dumping core or
equivalent. I *think* I recall seeing os.abort() actually segfault at some
point, but I can't replicate that now.

I tried to find the actual implementation of os.abort(), but I couldn't work
out where it was or what it does. Can somebody enlighten me?

“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

More information about the Python-list mailing list