Re: How to clean a module?

2007-06-01 Thread Diez B. Roggisch
ai wrote: Yes, you are right. But from this problem, could I infer that the statement del xxx doesn't release the memory which xxx used? It just removes the name xxx from the current scope - which will result in a reference counter decrease. If that was the last reference, the object will be

Re: How to clean a module?

2007-06-01 Thread ai
thx On Jun 1, 6:50 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: ai wrote: Yes, you are right. But from this problem, could I infer that the statement del xxx doesn't release the memory which xxx used? It just removes the name xxx from the current scope - which will result in a

How to clean a module?

2007-05-31 Thread ai
It assumes that there is a module A which have two global variables X and Y. If I run import A in the IDLE shell, then I can use A.X and A.Y correctly. But if I want to change the module A and then delete the variable Y, I find I can use A.Y just the same as before! In fact, I have tried all the

Re: How to clean a module?

2007-05-31 Thread Diez B. Roggisch
ai schrieb: It assumes that there is a module A which have two global variables X and Y. If I run import A in the IDLE shell, then I can use A.X and A.Y correctly. But if I want to change the module A and then delete the variable Y, I find I can use A.Y just the same as before! In fact, I

Re: How to clean a module?

2007-05-31 Thread Maric Michaud
ai a écrit : It assumes that there is a module A which have two global variables X and Y. If I run import A in the IDLE shell, then I can use A.X and A.Y correctly. But if I want to change the module A and then delete the variable Y, I find I can use A.Y just the same as before! It's unlikely

Re: How to clean a module?

2007-05-31 Thread ai
Yes, you are right. But from this problem, could I infer that the statement del xxx doesn't release the memory which xxx used? On May 31, 11:21 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: ai schrieb: It assumes that there is a module A which have two global variables X and Y. If I run

Re: How to clean a module?

2007-05-31 Thread ai
Perhaps you misundstand me. I means if you reedit a module file and reload it, the interpreter doesn't follow the change you have made exactly. For example, you import a module, edit the module file (you may remove a global variable or change its name), save the change, reload the module (or del