i'm newer in python but i have some package from other languages . Here's my question : i need to change an instance reference inside a function.This instance is passed as parameter. but i didn't know how to do it. I think i miss something in Python basics.The code bellow is given as example for what i want:
class Foo(object):
def __init__(self,a):
self.a = a
def func(a):
b = Foo(3)
a = b
var1 = Foo(5)
print(var1.a) # 5
func(var1)
print(var1.a) # it display 5 not 3