Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90870
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Why does the first loop go wrong with Python3 |
| Organization | Decebal Computing |
| References | <878uckvjoy.fsf@Equus.decebal.nl> <mailman.133.1432041396.17265.python-list@python.org> <874mn8vd8n.fsf@Equus.decebal.nl> <mailman.142.1432050607.17265.python-list@python.org> |
| Date | 2015-05-19 18:39 +0200 |
| Message-ID | <87wq04ttbp.fsf@Equus.decebal.nl> (permalink) |
Op Tuesday 19 May 2015 17:49 CEST schreef Ian Kelly:
> On Tue, May 19, 2015 at 8:44 AM, Cecil Westerhof <Cecil@decebal.nl> wrote:
>> I looked at the documentation. Is it necessary to do a:
>> p.wait()
>> afterwards?
>
> It's good practice to clean up zombie processes by waiting on them,
> but they will also get cleaned up when your script exits.
You are right. I played a little with ipython3, which made finding
things out a lot easier. ;-)
In my case it is a script, that terminates very soon after being
finished with p, but it is certainly good practise to do it myself.
I always did a free in my C programming days. I was always told it was
not necessary, but I found it better to do it anyway.
By the way, what also works is:
p = None
But it was just a try in ipython3. I would never do this in real code.
I was just curious if this would be handled correctly and it is. :-)
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why does the first loop go wrong with Python3 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-19 14:24 +0200
Re: Why does the first loop go wrong with Python3 Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-05-19 14:16 +0100
Re: Why does the first loop go wrong with Python3 Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2015-05-19 16:38 +0200
Re: Why does the first loop go wrong with Python3 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-19 16:44 +0200
Re: Why does the first loop go wrong with Python3 Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-19 09:49 -0600
Re: Why does the first loop go wrong with Python3 Cecil Westerhof <Cecil@decebal.nl> - 2015-05-19 18:39 +0200
Re: Why does the first loop go wrong with Python3 Chris Angelico <rosuav@gmail.com> - 2015-05-20 03:11 +1000
csiph-web