Professional Documents
Culture Documents
>>> sizeof(obj)
4
>>> hex(addressof(obj))
'0xdeadbeef'
For more details about the function, read the man page. I urge you to read it before going on.
Notice that x, and y are POINTER(c_int), so we need to dereference them and take their values in order to actually
compare the value stored in the memory.
ptr is the returned void pointer. If key wasn't found in arr, the value would be None, but in this case we got a valid
value.
Also, we can see that ptr points to the correct value inside arr: