Python Forum
VM address (C pointer) of Python object - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: VM address (C pointer) of Python object (/thread-17725.html)



VM address (C pointer) of Python object - Skaperen - Apr-21-2019

i remember about a couple years ago seeing a means to get the virtual memory address of a python object and thought it was silly and useless. but today i could use that and have forgotten how it was done. the use case i have is some debugging assistance code to check if two or more refernces to an object are references to the same object. this is post trace dump output testing so some numeric value is needed rather than a function that report if two references are the same. anyone know how to get this?


RE: VM address (C pointer) of Python object - hshivaraj - Apr-21-2019

Do you mean id() function in python?