I created a class that has attributes as shown in the code below then I build an electron object, in order to not redefine the whole object I made the positron = electron
than I changed its name attribute the problem is that the two objects appeared to be pointing into each other "like C++" and any change in one object's attribute follow the same at the second's one, so how can I make a independent copy of an object into a different memory space independently.
The code:
class particule():
def __init__(self,name,Mass,TotaleEnergy=None):
super().__init__()
self.name=name
self.mass=Mass
self.energy=(TotaleEnergy if TotaleEnergy!=None else self.mass)
electron=particule("e-",0.511)
positron=electron ; electron.name="e+"
print(positron.name , electron.name)#I get e+,e+