Memory addressing
Simon Berube
sberub at gmail.com
Fri Apr 27 15:41:42 EDT 2007
Hi,
I have a rather simple question for which I couldn't find an
answer. I noticed how a significant number of objects in Python return
a __repr__() string along the lines of :
< Object at 0xXXXXXX>
I find this notation quite convenient to avoid out of control
strings when using large arrays but I was wondering how you can use
the memory address for assigning a new object.
In c, one could simple have a pointer to that memory address and
voila, you have a new object you can analyze however it seems like
python is allergic to direct memory manipulation.
Hence, I was wondering what is the correct way to go about obtaining
objects returned in such a fashion? What am I going wrong or what am I
not getting?
Regards,
More information about the Python-list
mailing list