Why an object changes its "address" between adjacent calls?

Jach Fong jfong at ms4.hinet.net
Sun Jun 17 05:40:03 EDT 2018


Steven D'Aprano at 2018/6/17 PM 04:19 wrote:
> On Sun, 17 Jun 2018 15:08:27 +0800, Jach Fong wrote:
> 
>> The "address" of the Font object 'TkDefaultFont' changes, why?
> 
> Its not an address, it is an ID number.
> 
> The ID number changes because you get a different object each time you
> call the function.

Thanks for remind me again. I had read the subject "Understanding
memory location of Python variables" recently in the forum
and noticed that ID is implementation dependent, not necessary an 
"address".

Just didn't get rid of my old habit:-)

--Jach

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus




More information about the Python-list mailing list