Re: [Tutor] python memory management

2016-09-04 Thread monik...@netzero.net
Thank you all for your explanations. I really enjoy learning about things like that. Monika -- Original Message -- From: Alan Gauld via Tutor To: zakaria , tutor@python.org Subject: Re: [Tutor] python memory management Date: Sun, 4 Sep 2016 01:22:27 +0100 On 03/09/16 23:20

Re: [Tutor] python memory management

2016-09-03 Thread Alan Gauld via Tutor
On 03/09/16 23:20, zakaria wrote: > Is there any practical usage of using reference cycling? There are a (very) few cases where data structures require the creation of cyclic references. One example I've used is in managing comms networks where nodes are multiply and/or cyclically linked and you n

Re: [Tutor] python memory management

2016-09-03 Thread Alan Gauld via Tutor
On 03/09/16 22:16, monik...@netzero.net wrote: > So what does [...] mean? Its Python's way of telling you that you have a self referential data structure. Its just a representational thing but without it Python would end up printing an infinite sequence of values. HTH -- Alan G Author of the Le

Re: [Tutor] python memory management

2016-09-03 Thread zakaria
Is there any practical usage of using reference cycling? On Sat, 2016-09-03 at 14:56 +0100, Alan Gauld via Tutor wrote: > On 03/09/16 04:25, monik...@netzero.net wrote: > > > > > Is this what you mean?  > > a = 5 > > b = a > > a = b > > No, you are confusing variable names with objects. > Here

Re: [Tutor] python memory management

2016-09-03 Thread monik...@netzero.net
So what does [...] mean? -- Original Message -- From: Peter Otten <__pete...@web.de> To: tutor@python.org Subject: Re: [Tutor] python memory management Date: Sat, 03 Sep 2016 14:26:12 +0200 monik...@netzero.net wrote: > > By: > "reference cycles: if one ob

Re: [Tutor] python memory management

2016-09-03 Thread Steven D'Aprano
On Thu, Sep 01, 2016 at 08:21:36PM +, monik...@netzero.net wrote: > Thank you for your explanation. It is very clear and confirms what I > thought I knew. However, I had a job interview and the interview said > it was a mistake that I did not say that in cases when there are > multiple prog

Re: [Tutor] python memory management

2016-09-03 Thread Alan Gauld via Tutor
On 03/09/16 04:25, monik...@netzero.net wrote: > Is this what you mean? > a = 5 > b = a > a = b No, you are confusing variable names with objects. Here you only have one object - the number 5. For a cycle you need at least 2 objects and those objects must be able to reference another object. In

Re: [Tutor] python memory management

2016-09-03 Thread Random832
On Fri, Sep 2, 2016, at 23:25, monik...@netzero.net wrote: > > By: > "reference cycles: if one object has a reference to another, and > that second object also has a reference to the first, that's a cycle." > > Is this what you mean? > a = 5 > b = a > a = b > > I just want to make sure I under

Re: [Tutor] python memory management

2016-09-03 Thread Peter Otten
monik...@netzero.net wrote: > > By: > "reference cycles: if one object has a reference to another, and > that second object also has a reference to the first, that's a cycle." > > Is this what you mean? > a = 5 > b = a > a = b No. int instances are immutable. The assignments above bind both /na

Re: [Tutor] python memory management

2016-09-03 Thread monik...@netzero.net
-- Original Message -- From: Steven D'Aprano To: tutor@python.org Subject: Re: [Tutor] python memory management Date: Fri, 2 Sep 2016 04:10:02 +1000 On Thu, Sep 01, 2016 at 02:12:11PM +, monik...@netzero.net wrote: > Hi: > Can somebody please explain how memory is managed

Re: [Tutor] python memory management

2016-09-01 Thread Joel Goldstick
l Message ------ > From: Steven D'Aprano > To: tutor@python.org > Subject: Re: [Tutor] python memory management > Date: Fri, 2 Sep 2016 04:10:02 +1000 > > On Thu, Sep 01, 2016 at 02:12:11PM +, monik...@netzero.net wrote: >> Hi: >> Can somebody please ex

Re: [Tutor] python memory management

2016-09-01 Thread monik...@netzero.net
situation should be handled? Thank you Monika -- Original Message -- From: Steven D'Aprano To: tutor@python.org Subject: Re: [Tutor] python memory management Date: Fri, 2 Sep 2016 04:10:02 +1000 On Thu, Sep 01, 2016 at 02:12:11PM +, monik...@netzero.net wrote: > H

Re: [Tutor] python memory management

2016-09-01 Thread Steven D'Aprano
On Thu, Sep 01, 2016 at 02:12:11PM +, monik...@netzero.net wrote: > Hi: > Can somebody please explain how memory is managed by python? What kind > of memory it uses? What structures use what kind of memory? > If many people work on the same project and have many instances of the > same object

Re: [Tutor] python memory management

2016-09-01 Thread Alan Gauld via Tutor
On 01/09/16 15:12, monik...@netzero.net wrote: > Can somebody please explain how memory is managed by python? > What kind of memory it uses? What structures use what kind of memory? I'm not sure what you have in mind? Do you want to know the internal structure of the various data types? Do you wa

[Tutor] python memory management

2016-09-01 Thread monik...@netzero.net
Hi: Can somebody please explain how memory is managed by python? What kind of memory it uses? What structures use what kind of memory? If many people work on the same project and have many instances of the same object how do they ensure that all instances are killed before the programs exit? App