[Python-Dev] ctypes: is it intentional that id() is the only way to get the address of an object?
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Jan 18 17:57:23 EST 2019
More information about the Python-Dev mailing list
Fri Jan 18 17:57:23 EST 2019
- Previous message (by thread): [Python-Dev] ctypes: is it intentional that id() is the only way to get the address of an object?
- Next message (by thread): [Python-Dev] ctypes: is it intentional that id() is the only way to get the address of an object?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chris Angelico wrote: > I would be strongly in favour of ctypes gaining a "get address of > object" function, which happens (in current CPythons) to return the > same value as id() does, but is specifically tied to ctypes. Isn't this what the ctypes.py_object type is for? Also, any code that does anything with the address of an object other than just pass it around is going to depend heavily on the Python implementation being used, so the idea of an implementation-independent way to deal with object addresses seems problematic. -- Greg
- Previous message (by thread): [Python-Dev] ctypes: is it intentional that id() is the only way to get the address of an object?
- Next message (by thread): [Python-Dev] ctypes: is it intentional that id() is the only way to get the address of an object?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list