I am working in replicating some things in C type languages for class to show most things are easy to replicate overall. I am trying to work with pointers but obviously thats not something readily available. Doing something like this can work though:
class point:
def __init__(self, obj): self.obj = obj
def get(self): return self.obj
def set(self, obj): self.obj = obj
I can then do something such as
a = point(5)
b = a
And use that in a similar fashion to pointers
But now I'm trying to see if the value of a variable can be set from the id of another. Here is some code that obviously doesn't work but is my train of thought.
a = 124
b = *(int*)(hex(id(a))
(b == a) //True
So if I have the address, is it possible to do something like that