Question about object lifetime and access

2014-01-15 Thread Asaf Las
Hi community i am beginner in Python and have possibly silly questions i could not figure out answers for. Below is the test application working with uwsgi to test json-rpc. from multiprocessing import Process from

Re: Question about object lifetime and access

2014-01-15 Thread Asaf Las
will never have reference count down to 0 even if they are not referenced from functions or class methods. Is this true? Does it mean that global objects are destroyed when interpreter exits or thread where it runs is terminated? On Wednesday, January 15, 2014 2:13:56 PM UTC+2, Asaf Las wrote: Hi

Re: Question about object lifetime and access

2014-01-15 Thread Asaf Las
Thanks! On Wednesday, January 15, 2014 3:05:43 PM UTC+2, Chris Angelico wrote: Questions are: - what is the lifetime for global object (p in this example). - will the p always have value it got during module loading - if new thread will be created will p be accessible to it -

Re: Question about object lifetime and access

2014-01-15 Thread Asaf Las
First of all many thanks to all for their detailed answers on subject. I really appreciate it! Correct. The global name is a reference, so the reference count will be at least 1. In fact, referencing the name from a function or method doesn't increase the ref count: -- Steven i have

<    1   2