Is it possible to get the Physical memory address of a variable in python?

dieter dieter at handshake.de
Tue Jan 24 04:59:20 EST 2017


Sourabh Kalal <kalalsunnyy at gmail.com> writes:

> how we can access the value from using id..
> like x=10
> id(x)
> 3235346364
>
> how i can read value 10 using id 3235346364

You should not do this (read the value instead by looking at "x") --
unless you are debugging at "C" level. For "C" level debugging,
there is a set of "gdb" macros allowing you to display Python
objects giving their "C" level address.




More information about the Python-list mailing list